From: Joan Lledó <[email protected]>

Not only check the destination socket is AF_INET, check also the given address.
---
 lwip/iioctl-ops.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lwip/iioctl-ops.c b/lwip/iioctl-ops.c
index 3ce3ab37..c7b6c332 100644
--- a/lwip/iioctl-ops.c
+++ b/lwip/iioctl-ops.c
@@ -130,6 +130,9 @@ siocsifXaddr (struct sock_user *user,
   if (!user)
     return EOPNOTSUPP;
 
+  if (addr->sa_family != AF_INET)
+    return EINVAL;
+
   if (!user->isroot)
     return EPERM;
 
-- 
2.50.1


Reply via email to