projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08b695a
)
Resolution to http://pecl.php.net/bugs/bug.php?id=5193 for all drivers.
author
George Schlossnagle
<gschlossnagle@php.net>
Thu, 1 Sep 2005 14:39:58 +0000
(14:39 +0000)
committer
George Schlossnagle
<gschlossnagle@php.net>
Thu, 1 Sep 2005 14:39:58 +0000
(14:39 +0000)
ext/pdo/pdo_stmt.c
patch
|
blob
|
history
diff --git
a/ext/pdo/pdo_stmt.c
b/ext/pdo/pdo_stmt.c
index 085a82270b203da274a1d2a4f24d7ff770fabcba..1060cc3ddf2561bb6c5773da81282c4f60abb40d 100755
(executable)
--- 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);