summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-08-05 23:32:18 +0000
committerFelipe Pena <felipe@php.net>2010-08-05 23:32:18 +0000
commitf171aefb313b5d9d0a36a0289c72c95af4faeca1 (patch)
tree4952106be8ad66c482e80403031e9f26ba391355
parent1e17bb2aab4e954b52704221d407891bc019e039 (diff)
downloadphp-git-f171aefb313b5d9d0a36a0289c72c95af4faeca1.tar.gz
- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values)
-rw-r--r--NEWS2
-rw-r--r--ext/pdo_dblib/dblib_stmt.c2
2 files changed, 3 insertions, 1 deletions
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;