diff options
author | Andrea Faulds <ajf@ajf.me> | 2014-12-13 22:28:45 +0000 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2014-12-13 22:28:45 +0000 |
commit | f804a3614ebc718f647e9205e6f593eba632dcd0 (patch) | |
tree | c90312bf4abb6a49e7f9e974cf1aff14fd14922f | |
parent | ba62b9bbf87635e5d12546c426324e095cb1a0bb (diff) | |
parent | 034e6decb3d1effa85afadcf07973bb8db433960 (diff) | |
download | php-git-f804a3614ebc718f647e9205e6f593eba632dcd0.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
Fix undefined behaviour in strnatcmp
update NEWS
move the test to the right place
Fixed bug #68545 NULL pointer dereference in unserialize.c
Conflicts:
NEWS
-rw-r--r-- | ext/standard/strnatcmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index face191a6e..4b07740bea 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -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; } |