[asterisk-bugs] [JIRA] (ASTERISK-28497) func_odbc: truncating Unicode string on readsql
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Thu Jan 2 09:42:25 CST 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-28497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249215#comment-249215 ]
Friendly Automation commented on ASTERISK-28497:
------------------------------------------------
Change 13531 merged by Friendly Automation:
func_odbc: acf_odbc_read() and cli_odbc_read() unicode support
[https://gerrit.asterisk.org/c/asterisk/+/13531|https://gerrit.asterisk.org/c/asterisk/+/13531]
> func_odbc: truncating Unicode string on readsql
> -----------------------------------------------
>
> Key: ASTERISK-28497
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28497
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Functions/func_odbc
> Affects Versions: 16.4.0
> Environment: FreeBSD 11.2, Asterisk 16.4.0, unixODBC-2.3.7, MS SQL 2012
> Reporter: Boris P. Korzun
> Assignee: Boris P. Korzun
> Severity: Minor
> Attachments: patch-funcs_func__odbc.c
>
>
> There's a table at MSSQL with NVARCHAR column.
> I've created a function to retrieve info from the column. But I've a faced the function returned a truncated data (if STRLEN of data more than 8 unicode characters).
> Example:
> ||MSSQL||Asterisk CLI||
> |АБВГ|АБВГ|
> |АБВГДЕЖЗИК|АБВГДЕЖЗИ|
> I've founded the {{ast_odbc_ast_str_SQLGetData()}} returns the multibyte data to the buffer which length is less than needed (received by {{SQLDescribeCol()}}.
> I suggest the patch where {{ast_odbc_ast_str_SQLGetData()}} considers column type for correct allocating the buffer.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list