cvs: gd /libgd gd_gif_in.c

[email protected] ("Nuno Lopes")
Newsgroups php.gd.cvs
Message-ID <cvsnlopess1172872936@cvsserver>
nlopess		Fri Mar  2 22:02:16 2007 UTC

  Modified files:              
    /gd/libgd	gd_gif_in.c 
  Log:
  MFB
  
http://cvs.php.net/viewvc.cgi/gd/libgd/gd_gif_in.c?r1=1.5&r2=1.6&diff_format=u
Index: gd/libgd/gd_gif_in.c
diff -u gd/libgd/gd_gif_in.c:1.5 gd/libgd/gd_gif_in.c:1.6
--- gd/libgd/gd_gif_in.c:1.5	Thu Jan 11 20:58:04 2007
+++ gd/libgd/gd_gif_in.c	Fri Mar  2 22:02:15 2007
@@ -115,7 +115,6 @@
        int             bitPixel;
        int	       i;
        /*1.4//int             imageCount = 0; */
-       char            version[4];
        /* 2.0.28: threadsafe storage */
        int ZeroDataBlock = FALSE;
 
@@ -126,10 +125,8 @@
        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)) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.