X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_cmdline%2Fcmdline_parse_etheraddr.c;h=24e04755cd9ec049f4c057895fbe53969e679551;hb=284ea1cc38b4d7cdfae660e217a809582030b1a9;hp=8d2811926e14e70a21f14585d5d5bc9ca15a15fe;hpb=add6c87ebe9337c66c3009f458c48fbccb727558;p=dpdk.git diff --git a/lib/librte_cmdline/cmdline_parse_etheraddr.c b/lib/librte_cmdline/cmdline_parse_etheraddr.c index 8d2811926e..24e04755cd 100644 --- a/lib/librte_cmdline/cmdline_parse_etheraddr.c +++ b/lib/librte_cmdline/cmdline_parse_etheraddr.c @@ -102,7 +102,7 @@ cmdline_parse_etheraddr(__attribute__((unused)) cmdline_parse_token_hdr_t *tk, (token_len != ETHER_ADDRSTRLENSHORT - 1)) return -1; - snprintf(ether_str, token_len+1, "%s", buf); + strlcpy(ether_str, buf, token_len + 1); tmp = my_ether_aton(ether_str); if (tmp == NULL)