From: Antony Dovgal Date: Tue, 10 Oct 2006 23:00:48 +0000 (+0000) Subject: access mode for dbase_open() cannot be < 0 X-Git-Tag: RELEASE_1_0_0RC1~1322 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff6207679631cf388e0aeed02f8fe4d1984bc547;p=php access mode for dbase_open() cannot be < 0 --- 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)) {