summaryrefslogtreecommitdiff
path: root/source/tools/murun.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-06-30 15:21:56 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-07-06 13:34:37 +0200
commit255776a778b519183d6935ff0cb4b766644fa830 (patch)
tree16c2d411870b31cc25a2941d90ca862c10083667 /source/tools/murun.c
parentb644ed1360d0e47c03a637bbc568000d57d0cdbf (diff)
downloadmupdf-255776a778b519183d6935ff0cb4b766644fa830.tar.xz
pdf: Drop generation number from public interfaces.
The generation number is only needed for decryption, and is assumed to be zero or irrelevant for all other uses. Store the original object number and generation in the xref slot, so that we can decrypt them even when the objects have been renumbered, without needing to pass the original object number around through the stream loading APIs.
Diffstat (limited to 'source/tools/murun.c')
-rw-r--r--source/tools/murun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/tools/murun.c b/source/tools/murun.c
index 1f2f5e5f..df0cbdc2 100644
--- a/source/tools/murun.c
+++ b/source/tools/murun.c
@@ -2914,7 +2914,7 @@ static void ffi_PDFObject_readStream(js_State *J)
if (!pdf_is_stream(ctx, obj))
fz_throw(ctx, FZ_ERROR_GENERIC, "not a stream");
pdf = pdf_get_indirect_document(ctx, obj);
- buf = pdf_load_stream(ctx, pdf, pdf_to_num(ctx, obj), pdf_to_gen(ctx, obj));
+ buf = pdf_load_stream(ctx, pdf, pdf_to_num(ctx, obj));
} fz_catch(ctx)
rethrow(J);
ffi_pushbuffer(J, buf);
@@ -2971,7 +2971,7 @@ static void ffi_PDFObject_readRawStream(js_State *J)
if (!pdf_is_stream(ctx, obj))
fz_throw(ctx, FZ_ERROR_GENERIC, "not a stream");
pdf = pdf_get_indirect_document(ctx, obj);
- buf = pdf_load_raw_stream(ctx, pdf, pdf_to_num(ctx, obj), pdf_to_gen(ctx, obj));
+ buf = pdf_load_raw_stream(ctx, pdf, pdf_to_num(ctx, obj));
} fz_catch(ctx)
rethrow(J);
ffi_pushbuffer(J, buf);