From 671c29011618e091845e83e23eb2e6a700e10906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=BCnzli?= Date: Sun, 4 Jan 2015 23:38:09 +0100 Subject: Bug 695770: fix TODO in commit d7c0c0856b31be17823ae4745b2c542a9c71765f pdf_xref_find_subsection does indeed solidify the wrong xref section: it should operate only on the oldest xref and not overwrite the most recent one with older entries. --- source/pdf/pdf-xref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/pdf') diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index c99f8350..549809a2 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -658,8 +658,8 @@ pdf_xref_find_subsection(pdf_document *doc, int ofs, int len) else { /* Case 3 */ - ensure_solid_xref(doc, new_max, 0); - xref = &doc->xref_sections[0]; + ensure_solid_xref(doc, new_max, doc->num_xref_sections-1); + xref = &doc->xref_sections[doc->num_xref_sections-1]; sub = xref->subsec; } return &sub->table[ofs-sub->start]; -- cgit v1.2.3