diff options
author | Russ Cox <rsc@swtch.com> | 2008-05-10 13:35:19 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-05-10 13:35:19 -0400 |
commit | ada24b4005504a9cc8035987cf5175940ae568a7 (patch) | |
tree | 51def5fcbc79322c17ff8eb56c3734dc5a5d7060 /src/cmd/jpg | |
parent | 77809fb0cc7c9ff07f0ecd319240c8e3ee2c9528 (diff) | |
download | plan9port-ada24b4005504a9cc8035987cf5175940ae568a7.tar.gz plan9port-ada24b4005504a9cc8035987cf5175940ae568a7.tar.bz2 plan9port-ada24b4005504a9cc8035987cf5175940ae568a7.zip |
misc: array bounds fixes that gcc finds (John Gosset)
Diffstat (limited to 'src/cmd/jpg')
-rw-r--r-- | src/cmd/jpg/readgif.c | 5 |
1 files changed, 1 insertions, 4 deletions
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 <loop.count> in data */ if(type == 0xFF && hsize==11 && memcmp(h->buf, "NETSCAPE2.0", 11)==0){ |