From: George Schlossnagle Date: Thu, 1 Sep 2005 14:39:58 +0000 (+0000) Subject: Resolution to http://pecl.php.net/bugs/bug.php?id=5193 for all drivers. X-Git-Tag: PRE_NEW_OCI8_EXTENSION~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbd6ce4db52a2a98a33bd85dc9749ef1c7ada51d;p=php Resolution to http://pecl.php.net/bugs/bug.php?id=5193 for all drivers. --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 085a82270b..1060cc3ddf 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1534,6 +1534,10 @@ static PHP_METHOD(PDOStatement, getColumnMeta) if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &colno)) { RETURN_FALSE; } + if(colno < 0) { + pdo_raise_impl_error(stmt->dbh, stmt, "42P10", "column number must be non-negative" TSRMLS_CC); + RETURN_FALSE; + } if (!stmt->methods->get_column_meta) { pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "driver doesn't support meta data" TSRMLS_CC);