From 481809eb8f9607d85083c02d795f0bb95dfade23 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Sat, 23 Jul 2011 08:44:06 +0200 Subject: [PATCH] Handle missing startxref properly Bug 38209 --- poppler/PDFDoc.cc | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index b861c5d..17d780b 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -1118,9 +1118,10 @@ Guint PDFDoc::getStartXRef() } if (i < 0) { startXRefPos = 0; + } else { + for (p = &buf[i+9]; isspace(*p); ++p) ; + startXRefPos = strToUnsigned(p); } - for (p = &buf[i+9]; isspace(*p); ++p) ; - startXRefPos = strToUnsigned(p); } } -- 1.7.4.1