Understanding and dealing with an exception
Chris Angelico
rosuav at gmail.com
Sun Oct 14 00:49:36 EDT 2012
On Sun, Oct 14, 2012 at 3:36 PM, Vincent Davis <vincent at vincentdavis.net> wrote:
> Oops, I was going to make note of the file size. 1.2MB
Then I'd definitely declare the file bad; I don't know what the valid
ranges for channels and ysize are, but my reading of that is that your
file's completely corrupt, maybe even malicious. PIL probably ought to
check these things, so there may be a tracker issue coming from this,
but I'd be inclined to declare any thrown exception as meaning it's a
bad file. Call it "failed a security check" perhaps.
ChrisA
More information about the Python-list
mailing list