Skip to content

Commit

Permalink
[CBRD-25021] Change buffer size to prevent Gateway CAS coredump in Wi…
Browse files Browse the repository at this point in the history
…ndows (#4707)

http://jira.cubrid.org/browse/CBRD-25021

Purpose
In the process of changing Multibyte to Unicode in Windows, data overflow occurred because the size of the buffer containing Unicode data was small.
When data overflow occurred, coredump occurred irregularly in Gateway CAS.
Data overflow was prevented by changing the buffer size.

Implementation
N/A

Remarks
N/A
  • Loading branch information
airnet73 authored Sep 25, 2023
1 parent 828d1d2 commit 7af17a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/broker/cas_cgw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ cgw_sql_prepare (SQLCHAR * sql_stmt)
err_code = SQLAllocHandle (SQL_HANDLE_STMT, local_odbc_handle->hdbc, &local_odbc_handle->hstmt));
}

out_length = strlen (in_string) * sizeof (wchar_t);
out_length = strlen (in_string) * sizeof (wchar_t) + 1;
out_string = (wchar_t *) malloc (out_length);
if (out_string == NULL)
{
Expand Down

0 comments on commit 7af17a1

Please sign in to comment.