diff options
Diffstat (limited to 'net/ax25')
-rw-r--r-- | net/ax25/Kconfig | 6 | ||||
-rw-r--r-- | net/ax25/af_ax25.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/net/ax25/Kconfig b/net/ax25/Kconfig index 043fd5437809..97d686d115c0 100644 --- a/net/ax25/Kconfig +++ b/net/ax25/Kconfig @@ -40,7 +40,7 @@ config AX25 radio as well as information about how to configure an AX.25 port is contained in the AX25-HOWTO, available from <http://www.tldp.org/docs.html#howto>. You might also want to - check out the file <file:Documentation/networking/ax25.txt> in the + check out the file <file:Documentation/networking/ax25.rst> in the kernel source. More information about digital amateur radio in general is on the WWW at <http://www.tapr.org/>. @@ -88,7 +88,7 @@ config NETROM users as well as information about how to configure an AX.25 port is contained in the Linux Ham Wiki, available from <http://www.linux-ax25.org>. You also might want to check out the - file <file:Documentation/networking/ax25.txt>. More information about + file <file:Documentation/networking/ax25.rst>. More information about digital amateur radio in general is on the WWW at <http://www.tapr.org/>. @@ -107,7 +107,7 @@ config ROSE users as well as information about how to configure an AX.25 port is contained in the Linux Ham Wiki, available from <http://www.linux-ax25.org>. You also might want to check out the - file <file:Documentation/networking/ax25.txt>. More information about + file <file:Documentation/networking/ax25.rst>. More information about digital amateur radio in general is on the WWW at <http://www.tapr.org/>. diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index ff57ea89c27e..fd91cd34f25e 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -635,8 +635,10 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, break; case SO_BINDTODEVICE: - if (optlen > IFNAMSIZ) - optlen = IFNAMSIZ; + if (optlen > IFNAMSIZ - 1) + optlen = IFNAMSIZ - 1; + + memset(devname, 0, sizeof(devname)); if (copy_from_user(devname, optval, optlen)) { res = -EFAULT; |