]> granicus.if.org Git - php/commitdiff
Adjusted input check.
authorIlia Alshanetsky <iliaa@php.net>
Fri, 3 Sep 2004 03:35:22 +0000 (03:35 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 3 Sep 2004 03:35:22 +0000 (03:35 +0000)
ext/dio/dio.c

index 4e26188aa951fa96fb5e396b5924ba08af8d1434..6f89bd61fbc4f59d4e38e122841fe96d31e63415 100644 (file)
@@ -249,8 +249,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;
        }