[asterisk-bugs] [JIRA] (ASTERISK-28497) func_odbc: truncating Unicode string on readsql
Boris P. Korzun (JIRA)
noreply at issues.asterisk.org
Wed Aug 7 04:39:47 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=247714#comment-247714 ]
Boris P. Korzun commented on ASTERISK-28497:
--------------------------------------------
[~jcolp], I've signed it. But it must be approved by somebody. I will reattach the patch after approving of signature.
> 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