]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ax25/af_ax25.c
Merge remote-tracking branch 'net-next/master'
[karo-tx-linux.git] / net / ax25 / af_ax25.c
index 4b4d2b779ec1a08202303863fea1b74c67f04383..a00123ebb0ae0705c8e45e8433a07e96a2a06fe5 100644 (file)
@@ -1735,7 +1735,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
                        res = -EFAULT;
                        break;
                }
-               if (amount > AX25_NOUID_BLOCK) {
+               if (amount < 0 || amount > AX25_NOUID_BLOCK) {
                        res = -EINVAL;
                        break;
                }