Summary: | Infinite Loop in fz_skip_space (source/pdf/pdf-xref.c) | ||
---|---|---|---|
Product: | MuPDF | Reporter: | traceprobe |
Component: | mupdf | Assignee: | MuPDF bugs <mupdf-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | castro8583bennett, mjg, sebastian.rasmussen |
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: |
poc for infinite loop
Patch |
Description
traceprobe
2018-04-21 12:07:44 UTC
Steps to reproduce: 1) download mupdf-1.13.0-source.tar.gz 2) decompress and compile 3) download attached POC 4) execute: ./mutool show $POC "if (c > 32 || c == EOF)" would make sense: return when there is a non-space as the next char or nothing left to read. Then all spaces (in fact: everything <=32) has been skipped. Otherwise, ending a line with spaces gives an infinite loop. Created attachment 15230 [details]
Patch
(In reply to M.J.G. from comment #3) > Created attachment 15230 [details] > Patch Hello M.J.G., I was wondering if this bug issue still not fix? Do we have additional reference to help us fix this bug? Thank you. Castro B CEO - Owner https://alternatives.co/ (In reply to Carlo B from comment #4) > (In reply to M.J.G. from comment #3) > > Created attachment 15230 [details] > > Patch > > Hello M.J.G., I was wondering if this bug issue still not fix? Do we have > additional reference to help us fix this bug? Thank you. > > Castro B > CEO - Owner > https://alternatives.co/ The problem is still there in the current source code (without my patch). I'm the maintainer of the Fedora package for mupdf, I've got no say over here. There is a proof of concept by the original poster and a patch by myself which fixes the infinite loop. Nothing more I can do. Fixed in commit 2e43685dc8a8a886fc9df9b3663cf199404f7637 Author: Sebastian Rasmussen <sebras@gmail.com> Date: Tue Aug 21 19:07:57 2018 +0800 Bug 699271: Fix eternal loop when skipping space before EOF. Thanks to Michael J Gruber for providing this oneliner. |