You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that sometimes, after SQLGetData call, alloc_buffer becomes dirty in a sense that it's not properly terminated by the \x00 character. Because of that, when you want to decode a string (let's say, it's encoded in utf-8), after truncating it by the \x00 character, you get not only a desired string but also a part of a previous string that was written to the same buffer and a decoding process may fail.
I've noticed that sometimes, after
SQLGetData
call,alloc_buffer
becomes dirty in a sense that it's not properly terminated by the\x00
character. Because of that, when you want to decode a string (let's say, it's encoded inutf-8
), after truncating it by the\x00
character, you get not only a desired string but also a part of a previous string that was written to the same buffer and a decoding process may fail.Here's a quick fix for that: PR
UPD:
OSes I use:
Linux
/macOS
ODBC Driver:
unixODBC
The text was updated successfully, but these errors were encountered: