Posted on 2010-02-02 08:41:27.96162-08 by binarybits
Infinite Loop in CAM::PDF
Hi, I've found a serious bug in CAM::PDF. Code to reproduce:
#!/usr/bin/perl -w use CAM::PDF; my $pdf = CAM::PDF->new("bad.pdf"); my $pagetree = $pdf->getPageContentTree(1);
The file bad.pdf is here. (Careful, 4 MB). When you run this, it generates an almost instantaneous infinite loop/memory leak. On my machine, the perl process immediately starts eating memory at a rate of about 10 MB/sec, and dies when it exceeds the memory available on my laptop. I may try to figure out the problem myself, but I thought I'd post it here in case others wanted to take a crack at it. Thanks. -Tim
Direct Responses: 12300 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.