[ 
https://issues.apache.org/jira/browse/TRAFODION-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16327318#comment-16327318
 ] 

ASF GitHub Bot commented on TRAFODION-2891:
-------------------------------------------

Github user traflm commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1394#discussion_r161806495
  
    --- Diff: core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp ---
    @@ -5153,7 +5153,7 @@ odbc_SQLSvc_GetSQLCatalogs_sme_(
                      {
                         ERROR_DESC_def *p_buffer = 
QryCatalogSrvrStmt->sqlError.errorList._buffer;
                         strncpy(RequestError, 
p_buffer->errorText,sizeof(RequestError) -1);
    -                    RequestError[sizeof(RequestError)] = '\0';
    +                    RequestError[sizeof(RequestError) - 1] = '\0';
    --- End diff --
    
    very good catch!


> fix the bufoverrun Critical error checked by TScanCode
> ------------------------------------------------------
>
>                 Key: TRAFODION-2891
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2891
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: xiaozhong.wang
>            Priority: Major
>         Attachments: Critical_trafodion_tscancode_codecheck.xml
>
>
> access the buffer over run, if the buffer is at end of memory, will be make a 
> core dump 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to