Permalink
Browse files

MFH: Fix #33153 Crash in mssql_next_result().

  • Loading branch information...
1 parent 110344d commit da2d7e7229c15b92eecc6a5c9a41eedf2d1c4d30 @fmk fmk committed Nov 18, 2005
Showing with 6 additions and 0 deletions.
  1. +1 −0 NEWS
  2. +5 −0 ext/mssql/php_mssql.c
View
1 NEWS
@@ -3,6 +3,7 @@ PHP NEWS
?? Nov 2005, PHP 5.1
- Fixed bug #35278 (Multiple virtual() calls crash Apache 2 php module). (Ilia)
- Fixed bug #35273 (Error in mapping soap - java types). (Dmitry)
+- Fixed bug #33153 (crash in mssql_next result). (Frank)
17 Nov 2005, PHP 5.1 Release Candidate 6
- Changed function parameter parsing to handle integers in a non-strict fashion
View
@@ -1865,6 +1865,11 @@ PHP_FUNCTION(mssql_next_result)
mssql_ptr = result->mssql_ptr;
retvalue = dbresults(mssql_ptr->link);
+
+ while (dbnumcols(mssql_ptr->link) <= 0 && retvalue == SUCCEED) {
+ retvalue = dbresults(mssql_ptr->link);
+ }
+
if (retvalue == FAIL) {
RETURN_FALSE;
}

0 comments on commit da2d7e7

Please sign in to comment.