cvs: gd(GD_2_0) /libgd gd_gif_in.c

From: Date: Fri, 02 Mar 2007 21:59:02 +0000
Subject: cvs: gd(GD_2_0) /libgd gd_gif_in.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-137@lists.php.net to get a copy of this message
nlopess Fri Mar 2 21:59:02 2007 UTC Modified files: (Branch: GD_2_0) /gd/libgd gd_gif_in.c Log: merge with php tree: fix access to unitialized memory (introduced with the strlcpy usage) # now gd_strlcpy() becomes useless again :P http://cvs.php.net/viewvc.cgi/gd/libgd/gd_gif_in.c?r1=1.5.2.1&r2=1.5.2.2&diff_format=u Index: gd/libgd/gd_gif_in.c diff -u gd/libgd/gd_gif_in.c:1.5.2.1 gd/libgd/gd_gif_in.c:1.5.2.2 --- gd/libgd/gd_gif_in.c:1.5.2.1 Mon Feb 26 23:39:43 2007 +++ gd/libgd/gd_gif_in.c Fri Mar 2 21:59:02 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; @@ -127,8 +126,7 @@ return 0; } - gd_strlcpy(version, (char *)buf + 3, sizeof(version)); - 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)) {

« previous php.gd.cvs (#137) next »