提交 e451fe25 编写于 作者: S sherman

7118283: Better input parameter checking in zip file processing

Summary: Fixed off-by-one bug in zip_util.c
Reviewed-by: alanb
上级 1f5c4396
......@@ -521,7 +521,7 @@ countCENHeaders(unsigned char *beg, unsigned char *end)
{
jint count = 0;
ptrdiff_t i;
for (i = 0; i + CENHDR < end - beg; i += CENSIZE(beg + i))
for (i = 0; i + CENHDR <= end - beg; i += CENSIZE(beg + i))
count++;
return count;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册