diff options
author | Albert Astals Cid <aacid@kde.org> | 2011-11-16 22:59:41 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-11-16 22:59:41 +0100 |
commit | dc8d28018daac6f521be3561f187c153c8e07bba (patch) | |
tree | 82edb8ca3af48e4e4efbd01e57ea1641bacc546f | |
parent | 1e05bebd40171d2f11c7334b6e3f0e4c4c620083 (diff) |
xpdf303: Check xrefEntryCompressed entries to be of correct type and in bounds
-rw-r--r-- | ALL_DIFF | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -20239,22 +20239,6 @@ diff -ru xpdf-3.02/xpdf/XRef.cc xpdf-3.03/xpdf/XRef.cc obj2.free();
obj3.free();
@@ -829,14 +864,26 @@
- break;
-
- case xrefEntryCompressed:
-#if 0 // Adobe apparently ignores the generation number on compressed objects
- if (gen != 0) {
- goto err;
- }
-#endif
-+ if (e->offset >= (Guint)size ||
-+ entries[e->offset].type != xrefEntryUncompressed) {
-+ error(errSyntaxError, -1, "Invalid object stream");
-+ goto err;
-+ }
-@@ -884,13 +931,16 @@
- }
-
Guint XRef::strToUnsigned(char *s) {
- Guint x;
+ Guint x, d;
|