summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/netrom/nr_route.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 915a87b..8d7716c 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -678,6 +678,11 @@ int nr_rt_ioctl(unsigned int cmd, void __user *arg)
}
switch (nr_route.type) {
case NETROM_NODE:
+ if (strnlen(nr_route.mnemonic, 7) == 7) {
+ ret = -EINVAL;
+ break;
+ }
+
ret = nr_add_node(&nr_route.callsign,
nr_route.mnemonic,
&nr_route.neighbour,
OpenPOWER on IntegriCloud