summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-08-21 19:07:57 +0800
committerSebastian Rasmussen <sebras@gmail.com>2018-08-21 22:04:15 +0800
commit2e43685dc8a8a886fc9df9b3663cf199404f7637 (patch)
tree486cf5c42aa5eb25d90488be6c61788311bac2db
parent5606857245ed81253a4e06bed73eaa813e684070 (diff)
downloadmupdf-2e43685dc8a8a886fc9df9b3663cf199404f7637.tar.xz
Bug 699271: Fix eternal loop when skipping space before EOF.
Thanks to Michael J Gruber for providing this oneliner.
-rw-r--r--source/pdf/pdf-xref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 682a3ddb..431755d6 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -649,7 +649,7 @@ fz_skip_space(fz_context *ctx, fz_stream *stm)
do
{
int c = fz_peek_byte(ctx, stm);
- if (c > 32 && c != EOF)
+ if (c == EOF || c > 32)
return;
(void)fz_read_byte(ctx, stm);
}