diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-10-10 23:00:48 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-10-10 23:00:48 +0000 |
| commit | ff6207679631cf388e0aeed02f8fe4d1984bc547 (patch) | |
| tree | 6577f25443ebc7cdd89bd09f60cb5ea8ef5133f0 | |
| parent | 81c149153eefa16891333827cf1afd9a30d10020 (diff) | |
| download | php-git-ff6207679631cf388e0aeed02f8fe4d1984bc547.tar.gz | |
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 4c9d6dea20..9afe7b0f9a 100644 --- a/ext/dbase/dbase.c +++ b/ext/dbase/dbase.c @@ -131,6 +131,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 (php_check_open_basedir(Z_STRVAL_PP(dbf_name) TSRMLS_CC)) { |
