From ada24b4005504a9cc8035987cf5175940ae568a7 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 10 May 2008 13:35:19 -0400 Subject: misc: array bounds fixes that gcc finds (John Gosset) --- src/cmd/jpg/readgif.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/cmd/jpg') diff --git a/src/cmd/jpg/readgif.c b/src/cmd/jpg/readgif.c index 22a0b68c..22365669 100644 --- a/src/cmd/jpg/readgif.c +++ b/src/cmd/jpg/readgif.c @@ -351,11 +351,8 @@ skipextension(Header *h) } if(hsize>0 && Bread(h->fd, h->buf, hsize) != hsize) giferror(h, extreaderr); - if(!hasdata){ - if(h->buf[hsize-1] != 0) - giferror(h, "ReadGIF: bad extension format"); + if(!hasdata) return; - } /* loop counter: Application Extension with NETSCAPE2.0 as string and 1 in data */ if(type == 0xFF && hsize==11 && memcmp(h->buf, "NETSCAPE2.0", 11)==0){ -- cgit v1.2.3