提交 971f1b1a 编写于 作者: V valeriep

6839886: Array overrun in pkcs11

Summary: Fix the wrong value when dealing w/ month and day.
Reviewed-by: mullan
上级 240b6009
......@@ -374,7 +374,7 @@ CK_DATE * jDateObjectPtrToCKDatePtr(JNIEnv *env, jobject jDate)
return NULL;
}
for (i = 0; (i < ckLength) && (i < 4) ; i++) {
for (i = 0; (i < ckLength) && (i < 2) ; i++) {
ckpDate->month[i] = jCharToCKChar(jTempChars[i]);
}
free(jTempChars);
......@@ -398,7 +398,7 @@ CK_DATE * jDateObjectPtrToCKDatePtr(JNIEnv *env, jobject jDate)
return NULL;
}
for (i = 0; (i < ckLength) && (i < 4) ; i++) {
for (i = 0; (i < ckLength) && (i < 2) ; i++) {
ckpDate->day[i] = jCharToCKChar(jTempChars[i]);
}
free(jTempChars);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册