1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 07:02:33 +02:00

Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fix undefined behaviour in strnatcmp
  update NEWS
  move the test to the right place
  Fixed bug #68545 NULL pointer dereference in unserialize.c
This commit is contained in:
Andrea Faulds
2014-12-13 22:30:19 +00:00

View File

@@ -117,11 +117,11 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len
ca = *ap; cb = *bp;
/* skip over leading zeros */
while (leading && ca == '0' && (ap+1 < aend) && isdigit(*(ap+1))) {
while (leading && ca == '0' && (ap+1 < aend) && isdigit((int)(unsigned char)*(ap+1))) {
ca = *++ap;
}
while (leading && cb == '0' && (bp+1 < bend) && isdigit(*(bp+1))) {
while (leading && cb == '0' && (bp+1 < bend) && isdigit((int)(unsigned char)*(bp+1))) {
cb = *++bp;
}