summaryrefslogtreecommitdiffstats
path: root/nhrpd/linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'nhrpd/linux.c')
-rw-r--r--nhrpd/linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nhrpd/linux.c b/nhrpd/linux.c
index 85e941e7b..74aec155f 100644
--- a/nhrpd/linux.c
+++ b/nhrpd/linux.c
@@ -130,7 +130,8 @@ static int linux_icmp_redirect_off(const char *iface)
char fname[256];
int fd, ret = -1;
- sprintf(fname, "/proc/sys/net/ipv4/conf/%s/send_redirects", iface);
+ snprintf(fname, sizeof(fname),
+ "/proc/sys/net/ipv4/conf/%s/send_redirects", iface);
fd = open(fname, O_WRONLY);
if (fd < 0)
return -1;