svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c
trunk/ext/pdo_firebird/firebird_statement.c

From: Date: Wed, 28 Dec 2011 10:17:17 +0000
Subject: svn: /php/php-src/ branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c
trunk/ext/pdo_firebird/firebird_statement.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-67369@lists.php.net to get a copy of this message
mariuz Wed, 28 Dec 2011 10:17:17 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=321467 Log: fix Bug #47415 PDO_Firebird segfaults when passing lowercased column name to bindColumn() Bug: https://bugs.php.net/47415 (Assigned) PDO_Firebird segfaults when passing lowercased column name to bindColumn() Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c U php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c U php/php-src/trunk/ext/pdo_firebird/firebird_statement.c Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:12:43 UTC (rev 321466) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:17:17 UTC (rev 321467) @@ -582,6 +582,9 @@ break; case PDO_PARAM_EVT_FETCH_POST: + if (param->paramno == -1) { + return 0; + } value = NULL; value_len = 0; caller_frees = 0; @@ -598,6 +601,15 @@ ZVAL_LONG(param->parameter, *(long*)value); break; } + case PDO_PARAM_EVT_NORMALIZE: + if (!param->is_param) { + char *s = param->name; + while (*s != '\0') { + *s = toupper(*s); + s++; + } + } + break; default: ZVAL_NULL(param->parameter); } Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:12:43 UTC (rev 321466) +++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:17:17 UTC (rev 321467) @@ -582,6 +582,9 @@ break; case PDO_PARAM_EVT_FETCH_POST: + if (param->paramno == -1) { + return 0; + } value = NULL; value_len = 0; caller_frees = 0; @@ -598,6 +601,15 @@ ZVAL_LONG(param->parameter, *(long*)value); break; } + case PDO_PARAM_EVT_NORMALIZE: + if (!param->is_param) { + char *s = param->name; + while (*s != '\0') { + *s = toupper(*s); + s++; + } + } + break; default: ZVAL_NULL(param->parameter); } Modified: php/php-src/trunk/ext/pdo_firebird/firebird_statement.c =================================================================== --- php/php-src/trunk/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:12:43 UTC (rev 321466) +++ php/php-src/trunk/ext/pdo_firebird/firebird_statement.c 2011-12-28 10:17:17 UTC (rev 321467) @@ -582,6 +582,9 @@ break; case PDO_PARAM_EVT_FETCH_POST: + if (param->paramno == -1) { + return 0; + } value = NULL; value_len = 0; caller_frees = 0; @@ -598,6 +601,15 @@ ZVAL_LONG(param->parameter, *(long*)value); break; } + case PDO_PARAM_EVT_NORMALIZE: + if (!param->is_param) { + char *s = param->name; + while (*s != '\0') { + *s = toupper(*s); + s++; + } + } + break; default: ZVAL_NULL(param->parameter); }

« previous php.cvs (#67369) next »