Changeset abc8e94 for lib/trace.c


Ignore:
Timestamp:
04/08/06 16:13:30 (16 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
8afe034
Parents:
c7658ea
Message:

Fix a security flaw
Tidy up some code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r67a14d4 rabc8e94  
    10091009#else
    10101010        assert(!"This should never be called when BPF not enabled");
     1011        trace_set_err(packet->trace,TRACE_ERR_OPTION_UNAVAIL,
     1012                                "Feature unavailable");
     1013        return -1;
    10111014#endif
    10121015}
     
    13821385{
    13831386        char *buf2 = buf;
    1384         static char staticbuf[17]={0,};
     1387        static char staticbuf[18]={0,};
    13851388        if (!buf2)
    13861389                buf2=staticbuf;
    1387         sprintf(buf2,"%02x:%02x:%02x:%02x:%02x:%02x",
     1390        snprintf(buf2,18,"%02x:%02x:%02x:%02x:%02x:%02x",
    13881391                        addr[0],addr[1],addr[2],
    13891392                        addr[3],addr[4],addr[5]);
Note: See TracChangeset for help on using the changeset viewer.