From acc1861ed06323585cadc161b2880c8128c1d40b Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 9 Aug 2021 16:35:35 -0500 Subject: [PATCH] server: Fix the parameter size check for IOCTL_AFD_EVENT_SELECT. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- server/sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/sock.c b/server/sock.c index 2660cf2dee0..27477200ed0 100644 --- a/server/sock.c +++ b/server/sock.c @@ -2420,7 +2420,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) { const struct afd_event_select_params_64 *params = get_req_data(); - if (get_req_data_size() < sizeof(params)) + if (get_req_data_size() < sizeof(*params)) { set_error( STATUS_INVALID_PARAMETER ); return 1; @@ -2433,7 +2433,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) { const struct afd_event_select_params_32 *params = get_req_data(); - if (get_req_data_size() < sizeof(params)) + if (get_req_data_size() < sizeof(*params)) { set_error( STATUS_INVALID_PARAMETER ); return 1;