diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index 915a87ba23e188faa31861aac9a38d3b2f180827..8d7716ca53429a99a08381f0459803731a535efe 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,