diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-09-23 17:08:10 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-09-23 17:09:24 +0100 |
commit | 1081e59243303d6c045c9aca67d5931c000a765b (patch) | |
tree | acfc5c4448dcd907eda78d1de62430051bb3f6d0 | |
parent | 43bcd8a7516bfbd455d81de7e00d5e139abce438 (diff) | |
download | mupdf-1081e59243303d6c045c9aca67d5931c000a765b.tar.xz |
Bug 694653: Watch for xref being NULL in pdf_xref_len
This can occur early on during xref repair.
-rw-r--r-- | source/pdf/pdf-xref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index aaa79bf3..01a584e3 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -98,7 +98,7 @@ int pdf_xref_len(pdf_document *doc) /* Return the length of the document's final xref section */ pdf_xref *xref = &doc->xref_sections[0]; - return xref->len; + return xref == NULL ? 0 : xref->len; } /* Used while reading the individual xref sections from a file */ |