summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-04-20 20:28:39 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-04-21 01:14:33 +0200
commit2b7165e76f78b4b92e7ec09de26d96c3e0c5849f (patch)
tree8835752ea32b4c6b2c2900749b5992cb8f1785b7 /nhrpd
parent*: manually remove some more sprintf (diff)
downloadfrr-2b7165e76f78b4b92e7ec09de26d96c3e0c5849f.tar.xz
frr-2b7165e76f78b4b92e7ec09de26d96c3e0c5849f.zip
*: use appropriate buffer sizes, specifiers
- Fix 1 byte overflow when showing GR info in bgpd - Use PATH_MAX for path buffers - Use unsigned specifiers for uint16_t's in zebra pbr Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nhrpd/linux.c b/nhrpd/linux.c
index 74aec155f..59c82b1c5 100644
--- a/nhrpd/linux.c
+++ b/nhrpd/linux.c
@@ -25,6 +25,7 @@
#include <linux/ip.h>
#include <linux/if_arp.h>
#include <linux/if_tunnel.h>
+#include <linux/limits.h>
#include "nhrp_protocol.h"
#include "os.h"
@@ -127,7 +128,7 @@ static int linux_configure_arp(const char *iface, int on)
static int linux_icmp_redirect_off(const char *iface)
{
- char fname[256];
+ char fname[PATH_MAX];
int fd, ret = -1;
snprintf(fname, sizeof(fname),