|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-01 10:45 UTC] george at omniti dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 10:00:01 2025 UTC |
Description: ------------ Passing negative values to getColumnMeta() leads to segfault, due to missing check for negative values. Same applies to PDO_POSTGRESQL as well (did not check other drivers, same problem may exist there) Reproduce code: --------------- Simple patch to fix the problem: --- mysql_statement.c.orig 2005-07-27 13:07:09.000000000 +1100 +++ mysql_statement.c 2005-08-24 15:45:20.388245424 +1100 @@ -458,7 +458,7 @@ if (!S->result) { return FAILURE; } - if (colno >= stmt->column_count) { + if (colno >= stmt->column_count || colno < 0) { /* error invalid column */ return FAILURE; }