diff options
Diffstat (limited to 'axconfig.c')
-rw-r--r-- | axconfig.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 { @@ -308,10 +310,12 @@ int ax25_config_load_ports(void) break; s = strchr(buffer, ':'); if (s) *s = 0; - s = buffer; + s = buffer; 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; |