felipe                                   Thu, 05 Aug 2010 23:32:18 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=301916

Log:
- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values)

Bug: http://bugs.php.net/52546 (Open) pdo_dblib segmentation fault when 
iterating MONEY values
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/pdo_dblib/dblib_stmt.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2010-08-05 22:18:37 UTC (rev 301915)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-08-05 23:32:18 UTC (rev 301916)
@@ -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)

Modified: php/php-src/branches/PHP_5_3/ext/pdo_dblib/dblib_stmt.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_dblib/dblib_stmt.c     2010-08-05 
22:18:37 UTC (rev 301915)
+++ php/php-src/branches/PHP_5_3/ext/pdo_dblib/dblib_stmt.c     2010-08-05 
23:32:18 UTC (rev 301916)
@@ -170,7 +170,7 @@
                                        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;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to