Skip Menu |

This queue is for tickets about the PDF-Reuse CPAN distribution.

Report information
The Basics
Id: 48804
Status: resolved
Priority: 0/
Queue: PDF-Reuse

People
Owner: cnighs [...] cpan.org
Requestors: four_7_12 [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.36_03



Subject: Bad PDF Spins CPU
Date: Tue, 18 Aug 2009 10:15:38 -0400
To: <bug-pdf-reuse [...] rt.cpan.org>
From: Matt Gardner <four_7_12 [...] hotmail.com>
When an xref points past the end of the document, PDF::Reuse spins the cpu. PDF::Reuse 0.35Perl 5.8.8RHEL 5 2.6.18-128.el5 Patch:In Reuse.pm@@ -4180,6 +4180,7 @@ } if ($buf =~ m'\bstartxref\s+(\d+)'o) { $xref = $1;+ die "Invallid XREF" if $xref > $bytes; while ($xref) { $res = sysseek INFIL, $xref, 0; $res = sysread INFIL, $buf, 200; Maybe there is some way to gracefully recover here, but I don't know what that would be. -Matt Show quoted text
_________________________________________________________________ Windows Live: Make it easier for your friends to see what you’re up to on Facebook. http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009
This suggestion has been implemented in branch bugs/48804 in my github repo. You may get a copy of the code zip'd here: https://github.com/cnighswonger/PDF-Reuse/archive/bugs/48804.zip Please verify that this fixes the issue and report back here. Once verified, I will include this fix in the next stable release.