From: Felipe Pena Date: Fri, 11 Dec 2009 22:30:46 +0000 (+0000) Subject: - Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes seg... X-Git-Tag: php-5.2.12~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf9e91475405fca17f26e4ec810abbf47a54aec2;p=php - Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes seg fault). (Original patch by davbrown4 at yahoo dot com) --- diff --git a/NEWS b/NEWS index d84440e50e..9c4a3f8fff 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Dec 2009, PHP 5.2.12RC5 +- Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes + seg fault). (davbrown4 at yahoo dot com, Felipe) 10 Dec 2009, PHP 5.2.12RC4 - Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 5fb0179994..c672005409 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1659,19 +1659,21 @@ static PHP_METHOD(PDOStatement, fetchAll) static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int is_param) /* {{{ */ { struct pdo_bound_param_data param = {0}; + long param_type = PDO_PARAM_STR; param.paramno = -1; - param.param_type = PDO_PARAM_STR; if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, - "lz|llz!", ¶m.paramno, ¶m.parameter, ¶m.param_type, ¶m.max_value_len, + "lz|llz!", ¶m.paramno, ¶m.parameter, ¶m_type, ¶m.max_value_len, ¶m.driver_params)) { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|llz!", ¶m.name, - ¶m.namelen, ¶m.parameter, ¶m.param_type, ¶m.max_value_len, + ¶m.namelen, ¶m.parameter, ¶m_type, ¶m.max_value_len, ¶m.driver_params)) { return 0; } } + + param.param_type = (int) param_type; if (param.paramno > 0) { --param.paramno; /* make it zero-based internally */