Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MFH: Fix #33201 Crash when fetching some data types

  • Loading branch information...
commit 6ed54ddc79b9be4ad12274703510c14692db7a5d 1 parent e1fac16
@fmk fmk authored
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
16 ext/mssql/php_mssql.c
@@ -891,11 +891,9 @@ 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 :
@@ -903,6 +901,8 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off
case SQLDECIMAL :
case SQLNUMERIC :
res_length += 5;
+ case 127 :
+ res_length += 20;
break;
}
@@ -961,11 +961,9 @@ 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 :
@@ -973,6 +971,8 @@ static void php_mssql_get_column_content_without_type(mssql_link *mssql_ptr,int
case SQLDECIMAL :
case SQLNUMERIC :
res_length += 5;
+ case 127 :
+ res_length += 20;
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.