File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1753,7 +1753,7 @@ static py::object FetchLobColumnData(SQLHSTMT hStmt,
17531753 if (!isWideChar && chunk[copyCount - 1 ] == ' \0 ' ) {
17541754 --copyCount;
17551755 LOG (" Loop {}: Trimmed null terminator (narrow)" , loopCount);
1756- } else if (isWideChar ) {
1756+ } else if (copyCount >= sizeof ( wchar_t ) ) {
17571757 auto wcharBuf = reinterpret_cast <const wchar_t *>(chunk.data ());
17581758 if (wcharBuf[(copyCount / sizeof (wchar_t )) - 1 ] == L' \0 ' ) {
17591759 copyCount -= sizeof (wchar_t );
@@ -1771,7 +1771,7 @@ static py::object FetchLobColumnData(SQLHSTMT hStmt,
17711771 }
17721772 }
17731773 LOG (" FetchLobColumnData: Total bytes collected = {}" , buffer.size ());
1774-
1774+
17751775 if (indicator == 0 || buffer.empty ()) {
17761776 LOG (" FetchLobColumnData: Returning empty string for col {}" , colIndex);
17771777 return py::str (" " );
You can’t perform that action at this time.
0 commit comments