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
auto sqlwBuf = reinterpret_cast<const SQLWCHAR*>(chunk.data());
2406
+
auto sqlwBuf = reinterpret_cast<const SQLWCHAR*>(chunk.data()); // CodeQL [SM02986] This cast is safe because 1. std::vector guarantees proper alignment for its allocations
2407
+
// 2. SQLGetData writes complete SQLWCHAR units to the buffer
2408
+
// 3. bytesRead is controlled by the ODBC driver to be SQLWCHAR-aligned
std::wstring wstr(reinterpret_cast<constwchar_t*>(buffer.data()), buffer.size() / sizeof(wchar_t)); // CodeQL [SM02986] This cast is safe because 1. std::vector guarantees proper alignment for its allocations
2440
+
// 2. SQLGetData writes complete SQLWCHAR units to the buffer
2441
+
// 3. bytesRead is controlled by the ODBC driver to be SQLWCHAR-aligned
const SQLWCHAR* sqlwBuf = reinterpret_cast<const SQLWCHAR*>(buffer.data()); // CodeQL [SM02986] This cast is safe because 1. std::vector guarantees proper alignment for its allocations
2448
+
// 2. SQLGetData writes complete SQLWCHAR units to the buffer
2449
+
// 3. bytesRead is controlled by the ODBC driver to be SQLWCHAR-aligned
0 commit comments