diff options
author | George Schlossnagle <gschlossnagle@php.net> | 2005-09-01 14:39:58 +0000 |
---|---|---|
committer | George Schlossnagle <gschlossnagle@php.net> | 2005-09-01 14:39:58 +0000 |
commit | fbd6ce4db52a2a98a33bd85dc9749ef1c7ada51d (patch) | |
tree | d2478245df672ad013fe1fc4e2f56efd57e6281c | |
parent | 08b695a3e843d1661ba4261e5101ee975bb58c38 (diff) | |
download | php-git-fbd6ce4db52a2a98a33bd85dc9749ef1c7ada51d.tar.gz |
Resolution to http://pecl.php.net/bugs/bug.php?id=5193 for all drivers.
-rwxr-xr-x | ext/pdo/pdo_stmt.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |