nlopess         Fri Mar  2 18:46:16 2007 UTC

  Modified files:              
    /php-src/ext/gd/libgd       gd_gif_in.c 
  Log:
  MFB
  #Pierre: libgd isn't affected. this problem was caused by the recent 
conversion to strlcpy()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.12&r2=1.13&diff_format=u
Index: php-src/ext/gd/libgd/gd_gif_in.c
diff -u php-src/ext/gd/libgd/gd_gif_in.c:1.12 
php-src/ext/gd/libgd/gd_gif_in.c:1.13
--- php-src/ext/gd/libgd/gd_gif_in.c:1.12       Sat Nov  4 14:32:23 2006
+++ php-src/ext/gd/libgd/gd_gif_in.c    Fri Mar  2 18:46:16 2007
@@ -121,7 +121,6 @@
        int             bitPixel;
        int            i;
        /*1.4//int             imageCount = 0; */
-       char            version[4];
 
        gdImagePtr im = 0;
        ZeroDataBlock = FALSE;
@@ -133,10 +132,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)) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to