From 107a2d5f351e2ec5f3d097f2a644a0d2f0823c70 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 2 Apr 2024 08:51:06 +0000 Subject: [PATCH] fix unintended sizeof(pointer) introduced in rev 1.41 found with noderef.cocci, ok deraadt@ --- lib/libc/rpc/clnt_udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/rpc/clnt_udp.c b/lib/libc/rpc/clnt_udp.c index bcb5b35adf1..9aff57671c3 100644 --- a/lib/libc/rpc/clnt_udp.c +++ b/lib/libc/rpc/clnt_udp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clnt_udp.c,v 1.41 2024/01/22 16:18:06 deraadt Exp $ */ +/* $OpenBSD: clnt_udp.c,v 1.42 2024/04/02 08:51:06 jsg Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -77,7 +77,7 @@ clntudp_bufcreate1(struct clntudp_bufcreate_args *args) } args->sendsz = ((args->sendsz + 3) / 4) * 4; args->recvsz = ((args->recvsz + 3) / 4) * 4; - args->cu = (struct cu_data *)mem_alloc(sizeof(args->cu) + + args->cu = (struct cu_data *)mem_alloc(sizeof(*args->cu) + args->sendsz + args->recvsz); if (args->cu == NULL) { rpc_createerr.cf_stat = RPC_SYSTEMERROR; -- 2.20.1