After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 150648 - Be pickier about invalid BMP files?
Be pickier about invalid BMP files?
Status: RESOLVED OBSOLETE
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Low minor
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2004-08-20 16:04 UTC by Owen Taylor
Modified: 2014-10-22 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2004-08-20 16:04:37 UTC
Currently, gdk-pixbuf is very forgiving about invalid compressed
data ... modulo the infinite loop described in bug 150601, what
it does is simply ignore out-of-bounds data. Should we be refusing
to load the file and returning an error instead?

(If there are lots of BMPs out there which have out-of-bounds data,
then the ignore approach is likely better)

We also end up accepting arbitrary junk after the end of the BMP.
Comment 1 Alan Horkan 2004-08-29 15:40:57 UTC
> to load the file and returning an error instead?

No.  Within reason importers should be forgiving of bad file formats.  

The user would perceive this as Gnome being broken, even if it is not really
Gnome's fault.  

So long as it doesn't cause any severe performance reduction for the base case
it seems reasonable to tolerate bad input as best as possible.  
Comment 2 Owen Taylor 2004-08-29 20:26:41 UTC
If such BMPs actually *exist* then I agree with you completely.
But silently accepting invalid files before they come up makes it
more likely that people will create code generating invalid bmps.
And it isn't clear exactly what the interpretation should be.
Is what we are going to display something the user can make sense
of?

So, I don't think it's completely obvious. Though you may be right.
Comment 3 Bastien Nocera 2014-10-22 16:16:29 UTC
There haven't been any particular reports about BMP files that we couldn't handle (or mistakenly handled), so I'll close this as obsolete. Please reopen if you have test files which show problems.