summaryrefslogtreecommitdiff
path: root/pflocal
diff options
context:
space:
mode:
Diffstat (limited to 'pflocal')
-rw-r--r--pflocal/socket.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pflocal/socket.c b/pflocal/socket.c
index b1f9d770..f2b75a70 100644
--- a/pflocal/socket.c
+++ b/pflocal/socket.c
@@ -441,7 +441,11 @@ S_socket_getopt (struct sock_user *user,
switch (opt)
{
case SO_TYPE:
- assert (*value_len >= sizeof (int));
+ if (*value_len < sizeof (int))
+ {
+ ret = EINVAL;
+ break;
+ }
*(int *)*value = user->sock->pipe_class->sock_type;
*value_len = sizeof (int);
break;