diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-03-14 14:55:13 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-03-14 14:55:13 +0000 |
| commit | 0a076b11df8654df35c8cda2577b82a4dca5b59a (patch) | |
| tree | 0db0f90c18c891b82396d6a6852e11a62cf29047 /ext | |
| parent | 9d6e4964a1ce35dffd24dc00c5a59df22559597d (diff) | |
| download | php-git-0a076b11df8654df35c8cda2577b82a4dca5b59a.tar.gz | |
Fixed offset/length parameter validation in substr_compare() function.
Diffstat (limited to 'ext')
| -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 4f2897ce53..e12d5d6a0f 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4884,7 +4884,7 @@ PHP_FUNCTION(substr_compare) RETURN_FALSE; } - if (len && offset >= s1_len) { + if (offset + len >= s1_len) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "The start position cannot exceed initial string length."); RETURN_FALSE; } |
