summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harvey <aharvey@php.net>2010-08-24 16:58:16 +0000
committerAdam Harvey <aharvey@php.net>2010-08-24 16:58:16 +0000
commit05fe229ea7f30035742ce58191145976fccfd087 (patch)
tree2f08e4f277533fbf2d9eec934d94ba5f44fae0ec
parent1f34be323fe3e69af00b250c3ace083a337fd7f7 (diff)
downloadphp-git-05fe229ea7f30035742ce58191145976fccfd087.tar.gz
MFB5.3: The fix (and the fix to the fix) for bug #52546 (pdo_dblib segmentation
fault when iterating MONEY values).
-rw-r--r--ext/pdo_dblib/dblib_stmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c
index a9f8cf2f0c..5d49be71e2 100644
--- a/ext/pdo_dblib/dblib_stmt.c
+++ b/ext/pdo_dblib/dblib_stmt.c
@@ -170,8 +170,8 @@ 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);
- val->len = spprintf(val->data, 0, "%.4f", money_value);
+ 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;
default: