summaryrefslogtreecommitdiff
path: root/iptunnel.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptunnel.c')
-rw-r--r--iptunnel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/iptunnel.c b/iptunnel.c
index d9c282b..533a140 100644
--- a/iptunnel.c
+++ b/iptunnel.c
@@ -34,6 +34,7 @@
#include "intl.h"
#include "net-support.h"
#include "version.h"
+#include "util.h"
#undef GRE_CSUM
#define GRE_CSUM htons(0x8000)
@@ -279,7 +280,7 @@ static int parse_args(int argc, char **argv, struct ip_tunnel_parm *p)
p->iph.saddr = get_addr32(*argv);
} else if (strcmp(*argv, "dev") == 0) {
NEXT_ARG();
- strncpy(medium, *argv, IFNAMSIZ-1);
+ safe_strncpy(medium, *argv, IFNAMSIZ-1);
} else if (strcmp(*argv, "ttl") == 0) {
unsigned uval;
NEXT_ARG();
@@ -304,7 +305,7 @@ static int parse_args(int argc, char **argv, struct ip_tunnel_parm *p)
} else {
if (p->name[0])
usage();
- strncpy(p->name, *argv, IFNAMSIZ);
+ safe_strncpy(p->name, *argv, IFNAMSIZ);
}
argc--; argv++;
}