Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.1.15
-
None
-
Debian 11 amd64 and arm64
Description
SQLFetch crashes when target buffer was set to a null buffer to get column data length as SQL_C_WCHAR
Crash occurres in ma_statement.c on line 1914 when
*(char*)Stmt->result[i].buffer != '\0' |
gets dereferenced and buffer is a null pointer.
Attached are a test that currently crashes and a patch file that adds a NULL check
Thank you for your report. Everything looks to make sense.
Since your provide both the testcase and the fix, maybe it's a good idea for you to make a pull request here so it will be in the history under your name? But please note in the PR that you are contributing the whole thing under the BSD-new license.