iliaa Tue May 12 12:35:45 2009 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings bug38770.phpt
/php-src/ext/standard pack.c
/php-src NEWS
Log:
MFB: Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns
wrong result)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug38770.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/strings/bug38770.phpt
diff -u php-src/ext/standard/tests/strings/bug38770.phpt:1.1.2.1
php-src/ext/standard/tests/strings/bug38770.phpt:1.1.2.2
--- php-src/ext/standard/tests/strings/bug38770.phpt:1.1.2.1 Sun Nov 19
18:20:48 2006
+++ php-src/ext/standard/tests/strings/bug38770.phpt Tue May 12 12:35:45 2009
@@ -12,7 +12,7 @@
--EXPECT--
Array
(
- [1] => -30000
+ [1] => 4294937296
)
Array
(
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/pack.c?r1=1.57.2.5.2.8&r2=1.57.2.5.2.9&diff_format=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.57.2.5.2.8
php-src/ext/standard/pack.c:1.57.2.5.2.9
--- php-src/ext/standard/pack.c:1.57.2.5.2.8 Wed Dec 31 11:17:45 2008
+++ php-src/ext/standard/pack.c Tue May 12 12:35:45 2009
@@ -15,7 +15,7 @@
| Author: Chris Schneider <[email protected]> |
+----------------------------------------------------------------------+
*/
-/* $Id: pack.c,v 1.57.2.5.2.8 2008/12/31 11:17:45 sebastian Exp $ */
+/* $Id: pack.c,v 1.57.2.5.2.9 2009/05/12 12:35:45 iliaa Exp $ */
#include "php.h"
@@ -799,6 +799,13 @@
}
v |=
php_unpack(&input[inputpos], 4, issigned, map);
+ if (sizeof(long) > 4) {
+ if (type == 'l') {
+ v = (signed
int) v;
+ } else {
+ v = (unsigned
int) v;
+ }
+ }
add_assoc_long(return_value, n,
v);
break;
}
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1498&r2=1.2027.2.547.2.1499&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1498 php-src/NEWS:1.2027.2.547.2.1499
--- php-src/NEWS:1.2027.2.547.2.1498 Mon May 11 12:35:00 2009
+++ php-src/NEWS Tue May 12 12:35:45 2009
@@ -62,6 +62,8 @@
literal). (Ilia)
- Fixed bug #47616 (curl keeps crashing). (Felipe)
- Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
+- Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns wrong
+ result). (Ilia)
- Fixed bug #47487 (performance degraded when reading large chunks after fix of
bug #44607). (Arnaud)
- Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi). (Jani)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php