summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-xref.c
diff options
context:
space:
mode:
authorSimon Bünzli <zeniko@gmail.com>2014-12-12 15:30:40 +0100
committerSimon Bünzli <zeniko@gmail.com>2014-12-12 15:30:40 +0100
commitd7c0c0856b31be17823ae4745b2c542a9c71765f (patch)
tree0451f7c2700da4eca7bc50835feae983f7102fc9 /source/pdf/pdf-xref.c
parent026e27be430c5d1dca82f087ed1dc1a594232b70 (diff)
downloadmupdf-d7c0c0856b31be17823ae4745b2c542a9c71765f.tar.xz
update pointer after ensure_solid_xref call
After calling ensure_solid_xref, the pdf_xref pointer must be updated in case ensure_solid_xref has reallocated the sections table or uses a different section table than originally used. Commit e767bd783d91ae88cd79da19e79afb2c36bcf32a fails to do so in one case. TODO: Why does pdf_xref_find_subsection solidify xref section 0 instead of xref section sub?
Diffstat (limited to 'source/pdf/pdf-xref.c')
-rw-r--r--source/pdf/pdf-xref.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 5308a272..d72ae55c 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -625,6 +625,7 @@ pdf_xref_find_subsection(pdf_document *doc, int ofs, int len)
{
/* Case 3 */
ensure_solid_xref(doc, new_max, 0);
+ xref = &doc->xref_sections[0];
sub = xref->subsec;
}
return &sub->table[ofs-sub->start];