[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk-devel
Subject: Re: Strangely useless code in io-tga.c, part of gdk-pixbuf
From: Federico Mena Quintero <federico () ximian ! com>
Date: 2004-04-19 19:17:12
Message-ID: 1082402231.3297.19.camel () localhost ! localdomain
[Download RAW message or body]
On Sat, 2004-04-17 at 13:35, Chris Sherlock wrote:
> I was looking through gdk-pixbuf and I found something odd. In io-tga.c,
> there's the following code snippet:
>
> if (ctx->hdr->infolen > 255) {
> g_set_error(err, GDK_PIXBUF_ERROR,
> GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
> _("TGA image comment length is too long"));
> return FALSE;
> }
>
> I don't get it! infolen is an element of _TGAHeader, and is declared as
> a guint8. Isn't guint8 *gauranteed* to be an unsigned integer that's one
> byte long?
>
> If this is the case, this code check really isn't needed... so why is it
> in there?
It's already fixed. You must be looking at a rather old version of
GTK+.
http://bugzilla.gnome.org/show_bug.cgi?id=122710
Federico
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic