iliaa Thu Jan 26 15:45:33 2006 UTC
Added files: (Branch: PHP_5_1)
/php-src/ext/standard/tests/strings bug36148.phpt
Modified files:
/php-src NEWS
/php-src/ext/standard pack.c
Log:
Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to the
end of the string).
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.378&r2=1.2027.2.379&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.378 php-src/NEWS:1.2027.2.379
--- php-src/NEWS:1.2027.2.378 Thu Jan 26 13:26:51 2006
+++ php-src/NEWS Thu Jan 26 15:45:33 2006
@@ -15,6 +15,8 @@
- Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
on error. (Pierre)
- Fixed bug #36152 (problems with curl+ssl and pgsql+ssl in same PHP). (Mike)
+- Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to the
+ end of the string). (Ilia)
- Fixed bug #36134 (DirectoryIterator constructor failed to detect empty
directory names). (Ilia)
- Fixed bug #36113 (Reading records of unsupported type causes segfault).
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/pack.c?r1=1.57.2.3&r2=1.57.2.4&diff_format=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.57.2.3
php-src/ext/standard/pack.c:1.57.2.4
--- php-src/ext/standard/pack.c:1.57.2.3 Sun Jan 1 12:50:15 2006
+++ php-src/ext/standard/pack.c Thu Jan 26 15:45:33 2006
@@ -15,7 +15,7 @@
| Author: Chris Schneider <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: pack.c,v 1.57.2.3 2006/01/01 12:50:15 sniper Exp $ */
+/* $Id: pack.c,v 1.57.2.4 2006/01/26 15:45:33 iliaa Exp $ */
#include "php.h"
@@ -692,7 +692,9 @@
len = size * 2;
}
- len -= argb % 2;
+ if (argb > 0) {
+ len -= argb % 2;
+ }
buf = emalloc(len + 1);
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/strings/bug36148.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/strings/bug36148.phpt
+++ php-src/ext/standard/tests/strings/bug36148.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php