diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-08 11:40:50 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-08 11:40:50 +0200 |
commit | d7b5954f2818aff6db29a995f407797a7902f38f (patch) | |
tree | 87e5b82cf42a8b8809580b84db418983f33bd07b /ext/standard/string.c | |
parent | eea61cda7df1466a1f40a17c21b65901c1c68ce0 (diff) | |
download | php-git-d7b5954f2818aff6db29a995f407797a7902f38f.tar.gz |
Fixed bug #77853
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r-- | ext/standard/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 1c28c6a49c..ce90848561 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -5739,7 +5739,7 @@ PHP_FUNCTION(substr_compare) offset = (offset < 0) ? 0 : offset; } - if ((size_t)offset >= ZSTR_LEN(s1)) { + if ((size_t)offset > ZSTR_LEN(s1)) { php_error_docref(NULL, E_WARNING, "The start position cannot exceed initial string length"); RETURN_FALSE; } |