0.100.x - tightening up off-by-one error in pdf string parsing.

pull/75/merge
Mickey Sola 7 years ago committed by Micah Snyder
parent 700ed96af5
commit 0df2fedf28
  1. 2
      libclamav/pdfng.c

@ -591,7 +591,7 @@ char *pdf_parse_string(struct pdf_struct *pdf, struct pdf_obj *obj, const char *
/* Make a best effort to find the end of the string and determine if UTF-* */
p2 = ++p1;
if (!str) {
checklen = cli_strnlen(p1, objsize) + 1;
checklen = cli_strnlen(p1, objsize - 1) + 1;
}
else {
checklen = cli_strnlen(p1, checklen) + 1;

Loading…
Cancel
Save