Browse code

0.100.x - removing checklen constraint based on key string size when parsing pdf string objects

Mickey Sola authored on 2018/02/17 04:24:07
Showing 1 changed files
... ...
@@ -590,12 +590,7 @@ char *pdf_parse_string(struct pdf_struct *pdf, struct pdf_obj *obj, const char *
590 590
 
591 591
     /* Make a best effort to find the end of the string and determine if UTF-* */
592 592
     p2 = ++p1;
593
-    if (!str) {
594
-        checklen = cli_strnlen(p1, objsize - 1) + 1;
595
-    }
596
-    else {
597
-        checklen = cli_strnlen(p1, checklen) + 1;
598
-    }
593
+    checklen = cli_strnlen(p1, objsize - 1) + 1;
599 594
 
600 595
     while (p2 < objstart + checklen) {
601 596
         int shouldbreak=0;