18 do {
CID 1408204 (#1 of 1): Out-of-bounds access (OVERRUN)1. overrun-buffer-arg: Overrunning array text of 10240 2-byte elements by passing it to a function which accesses it at element index 20479 (byte offset 40959) using argument 20480.
19 rc = SQLGetDiagRec(type, handle, ++i, state, &native, text, sizeof(text), &len );
20 if (SQL_SUCCEEDED(rc)) {
21 if (!result.empty())
22 result += '\n';
23 result += std::to_string(i) + ":";
24 result += "[" + toUTF8(state) + "]";
25 result += "[" + std::to_string(native) + "]";
26 result += toUTF8(text);
27 }
28 } while (rc == SQL_SUCCESS);
29
30 return result;