X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fexception_path%2Fmain.c;h=0d79e5a24bd5379757386d3e30ae194c3786080e;hb=6f1e5d809a081241fccc1246beb70d0f620a8e59;hp=8f37f5fbf3533f90708ca475eaa2e99debc0147c;hpb=742bde12f3bd008c2f06d744330436d8b1a56720;p=dpdk.git diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c index 8f37f5fbf3..0d79e5a24b 100644 --- a/examples/exception_path/main.c +++ b/examples/exception_path/main.c @@ -176,7 +176,7 @@ static int tap_create(char *name) ifr.ifr_flags = IFF_TAP | IFF_NO_PI; if (name && *name) - snprintf(ifr.ifr_name, IFNAMSIZ, "%s", name); + strlcpy(ifr.ifr_name, name, IFNAMSIZ); ret = ioctl(fd, TUNSETIFF, (void *) &ifr); if (ret < 0) { @@ -185,7 +185,7 @@ static int tap_create(char *name) } if (name) - snprintf(name, IFNAMSIZ, "%s", ifr.ifr_name); + strlcpy(name, ifr.ifr_name, IFNAMSIZ); return fd; }