]> 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 4be86efe9f7c8deddb292c956a82326862a98d0e..6a33f63bb2db2c14e66c54734c5d51dbe42cd36d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,8 @@ PHP                                                                        NEWS
 - Fixed memory leak in extension loading when an error occurs on Windows.
   (Pierre)
 
+- Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes
+  seg fault). (davbrown4 at yahoo dot com, Felipe)
 - Fixed bug #50351 (performance regression handling objects, ten times slower
   in 5.3 than in 5.2). (Dmitry)
 - Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
index 7dc706a9ba7f053192e558672137eff270f15531..a8886bdc62c72857e1bf29f0838035ab4c345e35 100755 (executable)
@@ -1659,20 +1659,22 @@ 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 */
        } else if (!param.name) {