Permalink
Browse files

MFH: Fix #33201 Crash when fetching some data types

  • Loading branch information...
1 parent e1fac16 commit 6ed54ddc79b9be4ad12274703510c14692db7a5d @fmk fmk committed Nov 18, 2005
Showing with 9 additions and 8 deletions.
  1. +1 −0 NEWS
  2. +8 −8 ext/mssql/php_mssql.c
View
1 NEWS
@@ -6,6 +6,7 @@ PHP NEWS
- 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
View
@@ -891,18 +891,18 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off
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 :
case SQLMONEYN :
case SQLDECIMAL :
case SQLNUMERIC :
res_length += 5;
+ case 127 :
+ res_length += 20;
break;
}
@@ -961,18 +961,18 @@ static void php_mssql_get_column_content_without_type(mssql_link *mssql_ptr,int
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 :
case SQLMONEYN :
case SQLDECIMAL :
case SQLNUMERIC :
res_length += 5;
+ case 127 :
+ res_length += 20;
break;
}

0 comments on commit 6ed54dd

Please sign in to comment.