diff options
author | Antony Dovgal <tony2001@php.net> | 2006-10-10 23:01:23 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-10-10 23:01:23 +0000 |
commit | 7b58554f82bac7d9f191382d0cc54d016ef250b7 (patch) | |
tree | 2479881460bc41afc1e1da33e0ab06978ed68ba0 | |
parent | 5866ef42e6afd5d7d7c979edc4394097a8588737 (diff) | |
download | php-git-7b58554f82bac7d9f191382d0cc54d016ef250b7.tar.gz |
MFH: access mode for dbase_open() cannot be < 0
-rw-r--r-- | ext/dbase/dbase.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c index 2862db4650..bd3b2f5323 100644 --- a/ext/dbase/dbase.c +++ b/ext/dbase/dbase.c @@ -132,6 +132,9 @@ PHP_FUNCTION(dbase_open) 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 (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(dbf_name), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { |