|
From: Rehbein, A. <ale...@fo...> - 2017-12-04 17:15:37
|
Dear developers, I stumbled across a problem where the queried value `72623859790382856` (in hex: `0xFF01020304050607`) wasn't converted correctly when reading data from a `MYSQL_ROW`. The cause: In `_get_row_data`, no distinction is made between signed/unsigned integer types, so if a `MYSQL_ROW` holds, for instance, a string representation of a `uint64_t` that is too large for an `int64_t`, then `_get_row_data` will still call `atoll` to convert it, and we get undefined behavior. I haven't encountered corresponding errors for other integer types, because the values I had been using so far were too small in those cases, but the problem persists for *any* integer type (a distinction needs to be made). Regards Alexander Rehbein |