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

index 6825714105712a8f49a29e7c36f47238dde261c5..5315ef69b398b71172d1468539de04bb1a31ac58 100644 (file)
@@ -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;
        }