php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch fix_pdo_dblib_MONEY_seg_fault_5.2.14 for PDO related Bug #52546Patch version 2010-08-06 16:17 UTC Return to Bug #52546 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:
Developer: rgagnon24@gmail.comIndex: ext/pdo_dblib/dblib_stmt.c =================================================================== --- ext/pdo_dblib/dblib_stmt.c (revision 301933) +++ ext/pdo_dblib/dblib_stmt.c (working copy) @@ -170,8 +170,11 @@ case SQLMONEY4: case SQLMONEYN: { DBFLT8 money_value; + val->len = 32 + (2 * dbdatlen(H->link, i+1)); + val->data = emalloc(val->len); 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); + sprintf(val->data, "%.4f", money_value); + val->len = strlen(val->data); } break; default: |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Nov 21 15:01:30 2024 UTC |