cvs: php-src /ext/dio dio.c

From: Date: Mon, 23 Aug 2004 17:27:33 +0000
Subject: cvs: php-src /ext/dio dio.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-28405@lists.php.net to get a copy of this message
iliaa Mon Aug 23 13:27:33 2004 EDT Modified files: /php-src/ext/dio dio.c Log: Fixed possible crash inside dio_read(). http://cvs.php.net/diff.php/php-src/ext/dio/dio.c?r1=1.34&r2=1.35&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.35 --- 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:33 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) {

« previous php.cvs (#28405) next »