summaryrefslogtreecommitdiffstats
path: root/axconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'axconfig.c')
-rw-r--r--axconfig.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/axconfig.c b/axconfig.c
index 9486f5b..c6a2cb0 100644
--- a/axconfig.c
+++ b/axconfig.c
@@ -15,7 +15,9 @@
#include <netax25/axconfig.h>
#include <netax25/axlib.h>
#include <netrose/rose.h>
+
#include "pathnames.h"
+#include "util.h"
typedef struct _axport
{
@@ -312,6 +314,8 @@ int ax25_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;