Changeset 47d4f8c for tools


Ignore:
Timestamp:
06/27/18 18:01:48 (2 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
1ed69dc
Parents:
35de364
Message:

Fix various string truncation/overflow warnings

Thanks gcc 8!

Location:
tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tools/tracereport/misc_report.c

    r8e11beb r47d4f8c  
    6767{
    6868        static char ret[1024];
    69         char tmp[1024];
     69        char tmp[128];
    7070        ret[0]='\0';
    7171        if (ts == 0)
  • tools/tracesplit/tracesplit.c

    r92cf299 r47d4f8c  
    6161static char *strdupcat(char *str,char *app)
    6262{
    63         str=realloc(str,strlen(str)+strlen(app)+1);
    64         strncat(str,app,strlen(str) + strlen(app));
     63        int newsize = strlen(str)+strlen(app)+1;
     64        str=realloc(str,newsize);
     65        strncat(str,app,newsize - strlen(str) - 1);
    6566        return str;
    6667}
Note: See TracChangeset for help on using the changeset viewer.