summaryrefslogtreecommitdiffstats
path: root/rsconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'rsconfig.c')
-rw-r--r--rsconfig.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rsconfig.c b/rsconfig.c
index 21b91e0..8c7712b 100644
--- a/rsconfig.c
+++ b/rsconfig.c
@@ -18,6 +18,7 @@
#include <netax25/rsconfig.h>
#include "pathnames.h"
+#include "util.h"
typedef struct _rsport
{
@@ -237,6 +238,8 @@ int rs_config_load_ports(void)
while (isspace(*s & 0xff)) ++s;
memset(&ifr, 0, sizeof(ifr));
+ if (strlen(s) >= IFNAMSIZ)
+ unreachable();
strncpy(ifr.ifr_name, s, IFNAMSIZ-1);
ifr.ifr_name[IFNAMSIZ-1] = 0;