summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/mupdfinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/mupdfinfo.c b/apps/mupdfinfo.c
index 279298c2..6c0a31d7 100644
--- a/apps/mupdfinfo.c
+++ b/apps/mupdfinfo.c
@@ -901,7 +901,7 @@ showinfo(char *filename, int show, char *pagelist)
pagecount = pdf_count_pages(xref);
spec = fz_strsep(&pagelist, ",");
- while (spec)
+ while (spec && pagecount)
{
dash = strchr(spec, '-');