Skip to content

Commit

Permalink
fixed an error in mysqli_fetch_fields (function returns NULL instead …
Browse files Browse the repository at this point in the history
…of array

when row_number > num_fields).
Thanks to Marc Deslisle and phpMyAdmin team for the report.
  • Loading branch information
Georg Richter committed Oct 15, 2005
1 parent 3c04229 commit b343aa9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -34,6 +34,8 @@ PHP NEWS
- Added "new_link" parameter to mssql_connect() (Bug #34369). (Frank)
- Added missing safe_mode checks for image* functions and cURL. (Ilia)
- Added missing safe_mode/open_basedir checks for file uploads. (Ilia)
- Fixed an error in mysqli_fetch_fields (returned NULL instead of an
array when row number > field_count). (Georg)
- Fixed possible INI setting leak via virtual() in Apache 2 sapi. (Ilia)
- Fixed potential GLOBALS overwrite via import_request_variables() and
possible crash and/or memory corruption. (Ilia)
Expand Down
4 changes: 0 additions & 4 deletions ext/mysqli/mysqli_api.c
Expand Up @@ -740,10 +740,6 @@ PHP_FUNCTION(mysqli_fetch_fields)

MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, "mysqli_result");

if (!(field = mysql_fetch_field(result))) {
RETURN_FALSE;
}

array_init(return_value);

for (i = 0; i < mysql_num_fields(result); i++) {
Expand Down

0 comments on commit b343aa9

Please sign in to comment.