iliaa Mon Aug 23 13:27:46 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/dio dio.c Log: MFH: Fixed possible crash inside dio_read(). http://cvs.php.net/diff.php/php-src/ext/dio/dio.c?r1=1.34&r2=1.34.2.1&ty=u Index: php-src/ext/dio/dio.c diff -u php-src/ext/dio/dio.c:1.34 php-src/ext/dio/dio.c:1.34.2.1 --- php-src/ext/dio/dio.c:1.34 Wed Jun 9 15:27:36 2004 +++ php-src/ext/dio/dio.c Mon Aug 23 13:27:46 2004 @@ -215,6 +215,11 @@ ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); + if (bytes <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0."); + RETURN_FALSE; + } + data = emalloc(bytes + 1); res = read(f->fd, data, bytes); if (res <= 0) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php