Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ext/mbstring: fix new_value length check
Commit 8bbd095 added a check rejecting empty strings; in the merge commiot 379d9a1 however it was changed to a NULL check, one that did not make sense because ZSTR_VAL() is guaranteed to never be NULL; the length check was accidently removed by that merge commit. This bug was found by GCC's -Waddress warning: ext/mbstring/mbstring.c:748:27: warning: the comparison will always evaluate as ‘true’ for the address of ‘val’ will never be NULL [-Waddress] 748 | if (!new_value || !ZSTR_VAL(new_value)) { | ^ Closes GH-10532 Signed-off-by: George Peter Banyard <girgias@php.net>
- Loading branch information