diff options
| author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-03 14:29:49 +0000 |
|---|---|---|
| committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-03 14:29:49 +0000 |
| commit | 3149fc7c40158c3485c9c2b2dc2b42c8052c1396 (patch) | |
| tree | fb817e911236799909e098aacb464b344cdb6b01 /ext | |
| parent | 9c3f39a074e25db68948bd45d5179972b9c55a68 (diff) | |
| download | php-git-3149fc7c40158c3485c9c2b2dc2b42c8052c1396.tar.gz | |
Added offset validity check for iconv_strpos()
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/iconv/iconv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index d6674c59ce..3c32243c83 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -1593,6 +1593,11 @@ PHP_FUNCTION(iconv_strpos) RETURN_FALSE; } + if (offset < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string."); + RETURN_FALSE; + } + err = _php_iconv_strpos(&retval, haystk, haystk_len, ndl, ndl_len, offset, charset); _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset TSRMLS_CC); |
