]> granicus.if.org Git - php/commitdiff
- Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes seg...
authorFelipe Pena <felipe@php.net>
Fri, 11 Dec 2009 22:30:46 +0000 (22:30 +0000)
committerFelipe Pena <felipe@php.net>
Fri, 11 Dec 2009 22:30:46 +0000 (22:30 +0000)
  (Original patch by davbrown4 at yahoo dot com)

NEWS
ext/pdo/pdo_stmt.c

diff --git a/NEWS b/NEWS
index d84440e50e695d53f1f1efb238845f8bf4723467..9c4a3f8fff1fc67323b7bd9a205637f7527994e4 100644 (file)
--- 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
index 5fb0179994220ece0befd50e6e1dee6117e7a685..c672005409a99f25996105824a386ecab8578a1d 100755 (executable)
@@ -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!", &param.paramno, &param.parameter, &param.param_type, &param.max_value_len,
+                       "lz|llz!", &param.paramno, &param.parameter, &param_type, &param.max_value_len,
                        &param.driver_params)) {
                if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|llz!", &param.name,
-                               &param.namelen, &param.parameter, &param.param_type, &param.max_value_len, 
+                               &param.namelen, &param.parameter, &param_type, &param.max_value_len, 
                                &param.driver_params)) {
                        return 0;
                }       
        }
+       
+       param.param_type = (int) param_type;
 
        if (param.paramno > 0) {
                --param.paramno; /* make it zero-based internally */