summaryrefslogtreecommitdiff
path: root/android/jni/mupdf.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-06-11 16:53:35 +0100
committerRobin Watts <robin.watts@artifex.com>2013-06-13 15:22:37 +0100
commit919bc6d91961caac1f1e4aeb95fb581f778a5542 (patch)
tree5938f9140e0a112918ec8a6292124890343fa26e /android/jni/mupdf.c
parentf9ff77036a2a85ab990244191e1b7ba4b1a1665e (diff)
downloadmupdf-919bc6d91961caac1f1e4aeb95fb581f778a5542.tar.xz
Bug 694303: Fix various problems in pdf parsing
Spot a 'startxref' of 0 as being an error; otherwise the code falls through and we SEGV. Also update the pdf_repair_obj function to cope better with the new way we parse ints. Previously we parsed ints into the buffer and atoi'd them there - to step backwards over the int was therefore a matter of stepping backwards over the specified number of chars. In the 'new' code (now quite old) we parse ints directly, hence we cannot do this stepping back. Also, stepping backwards by more than 1 byte is risky anyway. We therefore adopt a smarter approach of returning the next lexed token from pdf_repair_obj. Thanks to zeniko for reporting these problems and providing a test file.
Diffstat (limited to 'android/jni/mupdf.c')
0 files changed, 0 insertions, 0 deletions