14.06.2011, 18:58
After playing this game for a while (I won't bore you with the details) I figured out the actual problem.
The pointer to the first element of the "array" m_stField is dereferenceable. The second one is a
NULL Pointer and trying to dereference the third one causes the server to crash (normal behavior
when trying to dereference an invalid pointer). But the function mysql_num_fields returns 27 in my case.
So the reason for that is:
mysql_fetch_fields does not really return an array of pointers to all the MYSQL_FIELD structures, as
it is said in the documentation, but only to a single element. I hope that my conclusion is wrong,
because that would mean the bug is neither in my script, nor in G-sTyLeZzZ's MySQL plugin
but in the MySQL API itself.
Please prove me wrong
The pointer to the first element of the "array" m_stField is dereferenceable. The second one is a
NULL Pointer and trying to dereference the third one causes the server to crash (normal behavior
when trying to dereference an invalid pointer). But the function mysql_num_fields returns 27 in my case.
So the reason for that is:
mysql_fetch_fields does not really return an array of pointers to all the MYSQL_FIELD structures, as
it is said in the documentation, but only to a single element. I hope that my conclusion is wrong,
because that would mean the bug is neither in my script, nor in G-sTyLeZzZ's MySQL plugin
but in the MySQL API itself.
Please prove me wrong

