void-packages/srcpkgs/mupdf/patches/CVE-2018-10289.patch

26 lines
823 B
Diff

From: Sebastian Rasmussen <sebras@gmail.com>
Date: Tue, 21 Aug 2018 11:07:57 +0000 (+0800)
Subject: Bug 699271: Fix eternal loop when skipping space before EOF.
X-Git-Tag: 1.14.0-rc1~81
X-Git-Url: http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=2e43685dc8a8a886fc9df9b3663cf199404f7637;hp=5606857245ed81253a4e06bed73eaa813e684070
Bug 699271: Fix eternal loop when skipping space before EOF.
Thanks to Michael J Gruber for providing this oneliner.
---
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 682a3dd..431755d 100644
--- source/pdf/pdf-xref.c
+++ 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);
}