From f171aefb313b5d9d0a36a0289c72c95af4faeca1 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 5 Aug 2010 23:32:18 +0000 Subject: [PATCH] - Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values) --- NEWS | 2 ++ ext/pdo_dblib/dblib_stmt.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ef5acfba5a..fa1e101c09 100644 --- 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) diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index a9f8cf2f0c..d812e2fb0a 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -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; -- 2.50.1