PHP :: Bug #31288 :: mysql_fetch_field() crashes
| Bug #31288 | mysql_fetch_field() crashes | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2004-12-24 17:18 UTC | Modified: | 2005-02-22 16:00 UTC |
|
||||||||||
| From: | m dot brachner at gmx dot at | Assigned: | ||||||||||||
| Status: | Closed | Package: | MySQL related | |||||||||||
| PHP Version: | 5CVS-2004-12-24 (dev) | OS: | Windows XP | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2004-12-24 17:18 UTC] m dot brachner at gmx dot at
Description:
------------
mysql_fetch_field produces an PHP-Crash. A Modal Window pops up (I have a German XP):
php-cgi.exe Error in Application
The instruction at '0x1000589c' referenced memory at '0x00000001'.
The memory could not be read.
Click OK to terminate the program.
MySQL Version 4.0.18
Reproduce code:
---------------
<?php
$conn = mysql_connect('localhost:3306', 'root', '');
mysql_select_db('odb');
$result = mysql_query('select * from classes');
/* get column metadata */
$i = 0;
while ($i < mysql_num_fields($result)) {
echo "Information for column $i:<br />\n";
$meta = mysql_fetch_field($result, $i);
$i++;
}
mysql_free_result($result);
?>
Expected result:
----------------
mysql_fetch_field should do the documented operations.
Actual result:
--------------
mysql_fetch_field produces an PHP-Crash. A Modal Window pops up (I have a German XP):
php-cgi.exe Error in Application
The instruction at '0x1000589c' referenced memory at '0x00000001'.
The memory could not be read.
Click OK to terminate the program.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2004-12-25 18:52 UTC] m dot brachner at gmx dot at
[2005-01-09 19:06 UTC] kurt at indermaur dot com
[2005-02-22 16:00 UTC] iliaa@php.net