diff options
author | Andrea Faulds <ajf@ajf.me> | 2014-12-13 22:30:19 +0000 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2014-12-13 22:30:19 +0000 |
commit | 51771ed238fd27b2c756df532a67237d138cc174 (patch) | |
tree | 5f14bb541fca9e6ddfbae7d7fc73ebd12795c84b | |
parent | 2e5de0c323310bfcbd6e1dba76ec1edeb5e7b6dd (diff) | |
parent | f804a3614ebc718f647e9205e6f593eba632dcd0 (diff) | |
download | php-git-51771ed238fd27b2c756df532a67237d138cc174.tar.gz |
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
-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; } |