diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-06-27 18:22:47 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-06-27 18:53:27 +0100 |
commit | 260e54a956c54058051ce6ff31b36ad0ae1b60aa (patch) | |
tree | 42ec426873ee4daa184b5747cbcbffeb4179101e /source/pdf/pdf-field.c | |
parent | e8dca3f6f8aa63c5fecca401c8292f74f3a61b6d (diff) | |
download | mupdf-260e54a956c54058051ce6ff31b36ad0ae1b60aa.tar.xz |
Bug 694382: Fix problems arising from recent pdf_obj changes.
Thanks to zeniko for spotting these problems.
When we close a document, purge the glyph cache to ensure that
no type3 glyphs hang around with pointers to pdf_obj's that
are now gone.
Pass doc to pdf_new_obj_from_str rather than NULL. We believe
that the reason this needed to be NULL is no longer valid.
Also, revert to using an int for ref counts.
In a quick test of our regression suite we only found 2 files
that ever made a refcount > 256 (and they never got larger than
768), but the potential is there for issues. Reverting to an
int until we can think of a better idea.
Diffstat (limited to 'source/pdf/pdf-field.c')
-rw-r--r-- | source/pdf/pdf-field.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/pdf/pdf-field.c b/source/pdf/pdf-field.c index d8e1a240..2a2f07cc 100644 --- a/source/pdf/pdf-field.c +++ b/source/pdf/pdf-field.c @@ -12,8 +12,7 @@ pdf_obj *pdf_get_inheritable(pdf_document *doc, pdf_obj *obj, char *key) obj = pdf_dict_gets(obj, "Parent"); } - return fobj ? fobj - : pdf_dict_gets(pdf_dict_gets(pdf_dict_gets(pdf_trailer(doc), "Root"), "AcroForm"), key); + return fobj ? fobj : pdf_dict_gets(pdf_dict_gets(pdf_dict_gets(pdf_trailer(doc), "Root"), "AcroForm"), key); } int pdf_get_field_flags(pdf_document *doc, pdf_obj *obj) |