sniper Wed Feb 25 07:36:25 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src NEWS
/php-src/ext/standard pack.c
Log:
MFH: Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.577&r2=1.1247.2.578&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.577 php-src/NEWS:1.1247.2.578
--- php-src/NEWS:1.1247.2.577 Tue Feb 24 16:53:57 2004
+++ php-src/NEWS Wed Feb 25 07:36:23 2004
@@ -1,6 +1,7 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Feb 2004, Version 4.3.5
+- Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS)
- Fixed bug #27383 (Potential crash inside fopen_wrapper, while parsing
response code). (Ilia)
- Fixed bug #27341 (HEAD requests fail to return data). (Ilia)
http://cvs.php.net/diff.php/php-src/ext/standard/pack.c?r1=1.40.2.4&r2=1.40.2.5&ty=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.40.2.4 php-src/ext/standard/pack.c:1.40.2.5
--- php-src/ext/standard/pack.c:1.40.2.4 Mon Apr 21 21:38:36 2003
+++ php-src/ext/standard/pack.c Wed Feb 25 07:36:24 2004
@@ -15,7 +15,7 @@
| Author: Chris Schneider <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: pack.c,v 1.40.2.4 2003/04/22 01:38:36 iliaa Exp $ */
+/* $Id: pack.c,v 1.40.2.5 2004/02/25 12:36:24 sniper Exp $ */
#include "php.h"
@@ -642,7 +642,7 @@
/* Space for name + number, safe as namelen is ensured <= 200
*/
char n[256];
- if (arg != 1) {
+ if (arg != 1 || namelen == 0) {
/* Need to add element number to name */
sprintf(n, "%.*s%d", namelen, name, i + 1);
} else {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php