1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

IPv4: Require "inet" promise for ioctl() on an IPv4Socket

This commit is contained in:
Andreas Kling 2020-01-12 13:28:07 +01:00
parent a27d2b7b32
commit 35c84504cd

View file

@ -435,6 +435,7 @@ KResult IPv4Socket::getsockopt(FileDescription& description, int level, int opti
int IPv4Socket::ioctl(FileDescription&, unsigned request, unsigned arg)
{
REQUIRE_PROMISE(inet);
auto* ifr = (ifreq*)arg;
if (!current->process().validate_read_typed(ifr))
return -EFAULT;