gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] /srv/bzr/gnash/trunk r9740: Fix for bug #24265 (crash


From: strk
Subject: Re: [Gnash-commit] /srv/bzr/gnash/trunk r9740: Fix for bug #24265 (crash loading malformed jpeg).
Date: Mon, 15 Sep 2008 12:35:18 +0200

On Mon, Sep 15, 2008 at 12:19:59PM +0200, Benjamin Wolsey wrote:
> 
> > 
> > Was the catch really needed here ?
> > If it was, shouldn't we catch std::exception directly ?
> > 
> > --strk;
> 
> The bad_alloc is thrown in the constructor of the ImageBase subclass, as
> the libjpeg calculates the size of this malformed image to be very
> large. The constructor is only likely to throw a bad_alloc, so I don't
> see any need to catch other exceptions.

I like more general catches, logging std::exception::what() ...
Also, if there's no ned to catch locally, we can rely on 
remote catches for it. 

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]