cvs: php-src(PHP_5_2) /ext/gd/libgd gd_gif_in.c /ext/pdo_firebird firebird_statement.c /ext/wddx wddx.c

From: Date: Sat, 24 Feb 2007 17:59:45 +0000
Subject: cvs: php-src(PHP_5_2) /ext/gd/libgd gd_gif_in.c /ext/pdo_firebird firebird_statement.c /ext/wddx wddx.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-43262@lists.php.net to get a copy of this message
iliaa Sat Feb 24 17:59:45 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdo_firebird firebird_statement.c /php-src/ext/wddx wddx.c /php-src/ext/gd/libgd gd_gif_in.c Log: strncpy() -> strlcpy() http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/firebird_statement.c?r1=1.18.2.1.2.3&r2=1.18.2.1.2.4&diff_format=u Index: php-src/ext/pdo_firebird/firebird_statement.c diff -u php-src/ext/pdo_firebird/firebird_statement.c:1.18.2.1.2.3 php-src/ext/pdo_firebird/firebird_statement.c:1.18.2.1.2.4 --- php-src/ext/pdo_firebird/firebird_statement.c:1.18.2.1.2.3 Sat Feb 24 02:17:25 2007 +++ php-src/ext/pdo_firebird/firebird_statement.c Sat Feb 24 17:59:45 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: firebird_statement.c,v 1.18.2.1.2.3 2007/02/24 02:17:25 helly Exp $ */ +/* $Id: firebird_statement.c,v 1.18.2.1.2.4 2007/02/24 17:59:45 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -655,8 +655,7 @@ RECORD_ERROR(stmt); return 0; } - strncpy(S->name, Z_STRVAL_P(val), sizeof(S->name)); - S->name[sizeof(S->name)] = 0; + strlcpy(S->name, Z_STRVAL_P(val), sizeof(S->name)); break; } return 1; http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.10.2.11&r2=1.119.2.10.2.12&diff_format=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.119.2.10.2.11 php-src/ext/wddx/wddx.c:1.119.2.10.2.12 --- php-src/ext/wddx/wddx.c:1.119.2.10.2.11 Sat Feb 24 02:17:27 2007 +++ php-src/ext/wddx/wddx.c Sat Feb 24 17:59:45 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c,v 1.119.2.10.2.11 2007/02/24 02:17:27 helly Exp $ */ +/* $Id: wddx.c,v 1.119.2.10.2.12 2007/02/24 17:59:45 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1034,10 +1034,9 @@ Z_STRVAL_P(ent->data) = estrndup(decoded, decoded_len); Z_STRLEN_P(ent->data) = decoded_len; } else { - Z_STRVAL_P(ent->data) = erealloc(Z_STRVAL_P(ent->data), - Z_STRLEN_P(ent->data) + decoded_len + 1); - strncpy(Z_STRVAL_P(ent->data)+Z_STRLEN_P(ent->data), decoded, decoded_len); Z_STRLEN_P(ent->data) += decoded_len; + Z_STRVAL_P(ent->data) = erealloc(Z_STRVAL_P(ent->data), Z_STRLEN_P(ent->data) + 1); + strlcpy(Z_STRVAL_P(ent->data) + Z_STRLEN_P(ent->data), decoded, Z_STRLEN_P(ent->data) + 1); Z_STRVAL_P(ent->data)[Z_STRLEN_P(ent->data)] = '\0'; } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.5.4.2.2.6&r2=1.5.4.2.2.7&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.5.4.2.2.6 php-src/ext/gd/libgd/gd_gif_in.c:1.5.4.2.2.7 --- php-src/ext/gd/libgd/gd_gif_in.c:1.5.4.2.2.6 Mon Jul 17 14:30:21 2006 +++ php-src/ext/gd/libgd/gd_gif_in.c Sat Feb 24 17:59:45 2007 @@ -133,8 +133,7 @@ if (strncmp((char *)buf,"GIF",3) != 0) { return 0; } - strncpy(version, (char *)buf + 3, 3); - version[3] = '\0'; + strlcpy(version, (char *)buf + 3, sizeof(version)); if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) { return 0;

« previous php.cvs (#43262) next »