Ignore:
Timestamp:
06/27/18 18:01:48 (3 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!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux_common.c

    rf9df20e r47d4f8c  
    8787                sock = socket(PF_INET, SOCK_STREAM, 0);
    8888                memset(&ifr, 0, sizeof(struct ifreq));
    89                 strncpy(ifr.ifr_name, libtrace->uridata, IF_NAMESIZE);
     89                strncpy(ifr.ifr_name, libtrace->uridata, IF_NAMESIZE - 1);
    9090                if (ioctl(sock, SIOCGIFHWADDR, &ifr) != 0) {
    9191                        perror("Can't get HWADDR for interface");
Note: See TracChangeset for help on using the changeset viewer.