From 23a74267d9710cbbf6f14e69cc38550a48af09ae Mon Sep 17 00:00:00 2001 From: George Schlossnagle Date: Thu, 1 Sep 2005 14:31:34 +0000 Subject: [PATCH] protect against underflow - refs http://pecl.php.net/bugs/bug.php?id=5193 --- ext/pdo_mysql/mysql_statement.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 51255b7f12..1c819a623a 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -476,7 +476,7 @@ static int pdo_mysql_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_va if (!S->result) { return FAILURE; } - if (colno >= stmt->column_count) { + if (colno >= stmt->column_count || colno < 0) { /* error invalid column */ return FAILURE; } -- 2.50.1