]> granicus.if.org Git - php/commitdiff
- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values)
authorFelipe Pena <felipe@php.net>
Thu, 5 Aug 2010 23:32:18 +0000 (23:32 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 5 Aug 2010 23:32:18 +0000 (23:32 +0000)
NEWS
ext/pdo_dblib/dblib_stmt.c

diff --git a/NEWS b/NEWS
index ef5acfba5a5a6ad93788ced9a095d159aa84bd31..fa1e101c09c063255b4181113e81fafde47f528d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2010, PHP 5.3.4
+- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
+  (Felipe)
 - Fixed bug #52534 (var_export array with negative key). (Felipe)
 - Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW).
   (Felipe)
index a9f8cf2f0c6d5f2efd932098dd070f2928b04353..d812e2fb0a2f738d54f863fc4f7acac0b8f12a0d 100644 (file)
@@ -170,7 +170,7 @@ static int pdo_dblib_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
                                        case SQLMONEY4:
                                        case SQLMONEYN: {
                                                DBFLT8 money_value;
-                                               dbconvert(NULL, S->cols[i].coltype, dbdata(H->link, i+1), dbdatlen(H->link, i+1), SQLFLT8, (LPBYTE)&money_value, val->len);
+                                               dbconvert(NULL, S->cols[i].coltype, dbdata(H->link, i+1), dbdatlen(H->link, i+1), SQLFLT8, (LPBYTE)&money_value, 8);
                                                val->len = spprintf(val->data, 0, "%.4f", money_value);
                                                }
                                                break;