[
https://issues.apache.org/jira/browse/TRAFODION-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16327316#comment-16327316
]
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_r161805913
--- Diff: core/conn/odb/src/odb.c ---
@@ -5313,7 +5313,7 @@ static void etabadd(char type, char *run, int id)
}
}
if ( etab[no].type == 'e' ) { /* name & create output file
*/
- for ( i = j = 0; etab[no].tgt[i] && i < sizeof(buff);
i++ ) {
+ for ( i = j = 0; i < sizeof(buff) && etab[no].tgt[i];
i++ ) {
--- End diff --
I don't really get this fully understand.
If i is out of bound for arry tgt, why this change will prevent the tag[i]
to be executed?
> 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)