From: Ilia Alshanetsky Date: Fri, 3 Sep 2004 03:36:21 +0000 (+0000) Subject: MFH: Adjusted input check. X-Git-Tag: php-4.3.9RC3~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5949c3968e2a3ba2dcec01713c6ca674fb61bc57;p=php MFH: Adjusted input check. --- diff --git a/ext/dio/dio.c b/ext/dio/dio.c index 6825714105..5315ef69b3 100644 --- a/ext/dio/dio.c +++ b/ext/dio/dio.c @@ -233,8 +233,8 @@ PHP_FUNCTION(dio_write) return; } - if (trunc_len <= 0 || trunc_len > data_len) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "length must be greater then zero and less then the length of specified string."); + if (trunc_len < 0 || trunc_len > data_len) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "length must be greater or equal to zero and less then the length of the specified string."); RETURN_FALSE; }