[asterisk-bugs] [JIRA] (ASTERISK-28497) func_odbc: truncating Unicode string on readsql

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Jan 23 11:13:32 CST 2020


     [ https://issues.asterisk.org/jira/browse/ASTERISK-28497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-28497:
-------------------------------------

    Target Release Version/s: 17.2.0

> 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
>      Target Release: 13.31.0, 16.8.0, 17.2.0
>
>         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