mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-20 21:34:24 -05:00
14 lines
344 B
Diff
14 lines
344 B
Diff
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
|
|
index 9c80212..05cfee7 100644
|
|
--- a/net/packet/af_packet.c
|
|
+++ b/net/packet/af_packet.c
|
|
@@ -3314,6 +3314,8 @@
|
|
return -EBUSY;
|
|
if (copy_from_user(&val, optval, sizeof(val)))
|
|
return -EFAULT;
|
|
+ if (val > INT_MAX)
|
|
+ return -EINVAL;
|
|
po->tp_reserve = val;
|
|
return 0;
|
|
}
|