summaryrefslogtreecommitdiff
path: root/src/gd_gif_in.c
diff options
context:
space:
mode:
authornlopess <none@none>2007-03-02 22:02:15 +0000
committernlopess <none@none>2007-03-02 22:02:15 +0000
commit2cfba6c7ed10f30605c77d9876be1b85ef1fed0c (patch)
treeb40285aa38cbb93803f5b41e05dbb51f7b172e09 /src/gd_gif_in.c
parent27e6ff3b6a4e5220db7cf0202fff16fa96abd1ba (diff)
downloadlibgd-2cfba6c7ed10f30605c77d9876be1b85ef1fed0c.tar.gz
MFB
Diffstat (limited to 'src/gd_gif_in.c')
-rw-r--r--src/gd_gif_in.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gd_gif_in.c b/src/gd_gif_in.c
index 1106b27..c76a7cb 100644
--- a/src/gd_gif_in.c
+++ b/src/gd_gif_in.c
@@ -115,7 +115,6 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromGifCtx(gdIOCtxPtr fd)
int bitPixel;
int i;
/*1.4//int imageCount = 0; */
- char version[4];
/* 2.0.28: threadsafe storage */
int ZeroDataBlock = FALSE;
@@ -126,10 +125,8 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromGifCtx(gdIOCtxPtr fd)
if (strncmp((char *)buf,"GIF",3) != 0) {
return 0;
}
- strncpy(version, (char *)buf + 3, 3);
- version[3] = '\0';
- if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) {
+ if ((strncmp((char *)buf+3, "87a", 3) != 0) && (strncmp((char *)buf+3, "89a", 3) != 0)) {
return 0;
}
if (! ReadOK(fd,buf,7)) {