fmk             Fri Nov 18 16:23:21 2005 EDT

  Modified files:              (Branch: PHP_5_1)
    /php-src    NEWS 
    /php-src/ext/mssql  php_mssql.c 
  Log:
  MFH: Fix #33201 Crash when fetching some data types
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.206&r2=1.2027.2.207&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.206 php-src/NEWS:1.2027.2.207
--- php-src/NEWS:1.2027.2.206   Fri Nov 18 15:48:46 2005
+++ php-src/NEWS        Fri Nov 18 16:23:19 2005
@@ -6,6 +6,7 @@
 - Fixed bug #33153 (crash in mssql_next result). (Frank)
 - Fixed bug #32009 (crash when mssql_bind() is called more than once). (Frank)
 - Fixed bug #33963 (mssql_bind() fails on input parameters). (Frank)
+- Fixed bug #33201 (Crash when fetching some data types). (Frank)
 
 17 Nov 2005, PHP 5.1 Release Candidate 6
 - Changed function parameter parsing to handle integers in a non-strict fashion
http://cvs.php.net/diff.php/php-src/ext/mssql/php_mssql.c?r1=1.152.2.6&r2=1.152.2.7&ty=u
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.152.2.6 
php-src/ext/mssql/php_mssql.c:1.152.2.7
--- php-src/ext/mssql/php_mssql.c:1.152.2.6     Fri Nov 18 15:40:52 2005
+++ php-src/ext/mssql/php_mssql.c       Fri Nov 18 16:23:20 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_mssql.c,v 1.152.2.6 2005/11/18 20:40:52 fmk Exp $ */
+/* $Id: php_mssql.c,v 1.152.2.7 2005/11/18 21:23:20 fmk Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -891,11 +891,9 @@
                                if ((column_type != SQLDATETIME && column_type 
!= SQLDATETIM4) || MS_SQL_G(datetimeconvert)) {
 
                                        switch (column_type) {
-                                               case SQLDATETIM4 :
-                                                       res_length += 14;
-                                                       break;
                                                case SQLDATETIME :
-                                                       res_length += 10;
+                                               case SQLDATETIM4 :
+                                                       res_length += 20;
                                                        break;
                                                case SQLMONEY :
                                                case SQLMONEY4 :
@@ -903,6 +901,8 @@
                                                case SQLDECIMAL :
                                                case SQLNUMERIC :
                                                        res_length += 5;
+                                               case 127 :
+                                                       res_length += 20;
                                                        break;
                                        }
 
@@ -961,11 +961,9 @@
                if ((column_type != SQLDATETIME && column_type != SQLDATETIM4) 
|| MS_SQL_G(datetimeconvert)) {
 
                        switch (column_type) {
-                               case SQLDATETIM4 :
-                                       res_length += 14;
-                                       break;
                                case SQLDATETIME :
-                                       res_length += 10;
+                               case SQLDATETIM4 :
+                                       res_length += 20;
                                        break;
                                case SQLMONEY :
                                case SQLMONEY4 :
@@ -973,6 +971,8 @@
                                case SQLDECIMAL :
                                case SQLNUMERIC :
                                        res_length += 5;
+                               case 127 :
+                                       res_length += 20;
                                        break;
                        }
                        

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

Reply via email to