odbc_util.c:214: odbc_wide2utf: Assertion `p+1-out <= o_len' failed #539
Unanswered
kothapraveen
asked this question in
Q&A
Replies: 1 comment
-
I cannot reproduce. I even wrote a fuzzer against the function but it does not crash. Are you sure you are not altering the strings while processing them (from a different thread) ? The function converts SQLWCHAR to utf-8. Are you sure SIZEOF_SQLWCHAR matches SQLWCHAR (it should be 2 for unixODBC) ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @freddy77 & Team
Please find the below details
Error:
retVal.size() was not equal to binLongVarCharMaxStr.size(); retVal.size()-->1; binLongVarCharMaxStr.size()-->5461
odbc_util.c:214: odbc_wide2utf: Assertion `p+1-out <= o_len' failed.
make: *** [Makefile:293: test] Aborted (core dumped)
Suspecting Method: SQLPrepareW()
currently we are using char
ConvertBetweenCodePages:
const char dstCodePage [] = "UCS-2", // Destination Code Page.
srcCodePage [] = "WCHAR_T"; // Source Code Page
freetds log:
token.c:2100:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2119: rows_affected = 0
token.c:2122:tds_process_end() state set to TDS_IDLE
util.c:179:Changed query state from READING to IDLE
util.c:83:logic error: cannot change query state from IDLE to PENDING
util.c:179:Changed query state from IDLE to IDLE
odbc.c:3766:odbc_process_tokens: tds_process_tokens returned 0
odbc.c:3767: result_type=4053, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3812:odbc_process_tokens: processed TDS_DONEPROC_RESULT
token.c:555:tds_process_tokens(0x2030fa0, 0x7ffd199b4d58, 0x7ffd199b4d5c, 0x26914)
token.c:558:tds_process_tokens() state is COMPLETED
odbc.c:3766:odbc_process_tokens: tds_process_tokens returned 1
odbc.c:3767: result_type=4052, TDS_DONE_COUNT=0, TDS_DONE_ERROR=0
odbc.c:3588:_SQLExecute: odbc_process_tokens returned result_type 4046
odbc.c:3751:SQLExecute returns SQL_SUCCESS
odbc.c:4680:SQLNumResultCols(0x20bdb30, 0x7ffd199b500e)
odbc.c:1918:SQLAllocStmt(0x202eb80, 0x20d9d20)
odbc.c:1810:_SQLAllocStmt(0x202eb80, 0x20d9d20)
odbc.c:4648:SQLGetStmtAttr(0x20e4150, 10010, 0x7ffd199b8510, 8, (nil))
odbc.c:4648:SQLGetStmtAttr(0x20e4150, 10011, 0x7ffd199b8510, 8, (nil))
odbc.c:4648:SQLGetStmtAttr(0x20e4150, 10012, 0x7ffd199b8510, 8, (nil))
odbc.c:4648:SQLGetStmtAttr(0x20e4150, 10013, 0x7ffd199b8510, 8, (nil))
odbc_export.h:837:SQLPrepareW(0x20e4150, insert character_datatypes_intl(nvarcharmax, description)
values (N'슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐>슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐>슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐슐>슐슐슐슐슐슐슐슐슐슐슐슐, 11164)
4575,1 Bot
Beta Was this translation helpful? Give feedback.
All reactions