cvs: php-src /ext/dbase dbase.c
| From: | Antony Dovgal | Date: | Tue, 10 Oct 2006 23:00:48 +0000 |
| Subject: | cvs: php-src /ext/dbase dbase.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-41049@lists.php.net to get a copy of this message | ||
tony2001 Tue Oct 10 23:00:48 2006 UTC
Modified files:
/php-src/ext/dbase dbase.c
Log:
access mode for dbase_open() cannot be < 0
http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbase.c?r1=1.83&r2=1.84&diff_format=u
Index: php-src/ext/dbase/dbase.c
diff -u php-src/ext/dbase/dbase.c:1.83 php-src/ext/dbase/dbase.c:1.84
--- php-src/ext/dbase/dbase.c:1.83 Tue Aug 8 15:53:54 2006
+++ php-src/ext/dbase/dbase.c Tue Oct 10 23:00:48 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dbase.c,v 1.83 2006/08/08 15:53:54 mike Exp $ */
+/* $Id: dbase.c,v 1.84 2006/10/10 23:00:48 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -131,6 +131,9 @@
if (Z_LVAL_PP(options) == 1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot open %s in write-only mode",
Z_STRVAL_PP(dbf_name));
RETURN_FALSE;
+ } else if (Z_LVAL_PP(options) < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid access mode %ld",
Z_LVAL_PP(options));
+ RETURN_FALSE;
}
if (php_check_open_basedir(Z_STRVAL_PP(dbf_name) TSRMLS_CC)) {