Skip Menu |
 

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

Report information
The Basics
Id: 118717
Status: resolved
Priority: 0/
Queue: PDF-API2

People
Owner: Nobody in particular
Requestors: jv [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.030
Fixed in: 2.031



Subject: Unguarded open in saveas
Download (untitled) / with headers
text/plain 420b
PDF/API2.pm, line 949, routine saveas, the open, print and close are not checked for errors. This may lead to mysterious messages and loss of data. A user of mine encountered this on Windows, where the program issued (for him) ununderstandable messages like: binmode() on closed filehandle OUTF printf on closed filehandle OUTF The culprit was another program that kept the pdf file open so it could not be rewritten.
Download (untitled) / with headers
text/plain 618b
Thanks for the report. I've added an "or die..." to the "open" call in open() and saveas(), which will give a more useful error. On Fri Nov 11 09:19:39 2016, JV wrote: Show quoted text
> PDF/API2.pm, line 949, routine saveas, the open, print and close are > not checked for errors. This may lead to mysterious messages and loss > of data. > > A user of mine encountered this on Windows, where the program issued > (for him) ununderstandable messages like: > > binmode() on closed filehandle OUTF > printf on closed filehandle OUTF > > The culprit was another program that kept the pdf file open so it > could not be rewritten.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.