cvs: php-src(PHP_4_3) /ext/dio dio.c

From: Date: Mon, 23 Aug 2004 17:27:53 +0000
Subject: cvs: php-src(PHP_4_3) /ext/dio dio.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-28407@lists.php.net to get a copy of this message
iliaa Mon Aug 23 13:27:53 2004 EDT Modified files: (Branch: PHP_4_3) /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.21.2.7&r2=1.21.2.8&ty=u Index: php-src/ext/dio/dio.c diff -u php-src/ext/dio/dio.c:1.21.2.7 php-src/ext/dio/dio.c:1.21.2.8 --- php-src/ext/dio/dio.c:1.21.2.7 Thu Feb 19 20:09:25 2004 +++ php-src/ext/dio/dio.c Mon Aug 23 13:27:53 2004 @@ -199,6 +199,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) {

« previous php.cvs (#28407) next »