From: Daiki Ueno Date: Tue, 16 Oct 2018 16:16:12 +0000 (+0200) Subject: build: Check return value of p11_rpc_buffer_get_uint64 X-Git-Tag: 0.23.15~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=213ea0815ef45411bf6c134918b79d2aad69c1dc;p=p11-kit build: Check return value of p11_rpc_buffer_get_uint64 --- diff --git a/p11-kit/rpc-client.c b/p11-kit/rpc-client.c index 0dd4525..e202e37 100644 --- a/p11-kit/rpc-client.c +++ b/p11-kit/rpc-client.c @@ -371,7 +371,8 @@ proto_read_ulong_array (p11_rpc_message *msg, CK_ULONG_PTR arr, /* We need to go ahead and read everything in all cases */ for (i = 0; i < num; ++i) { - p11_rpc_buffer_get_uint64 (msg->input, &msg->parsed, &val); + if (!p11_rpc_buffer_get_uint64 (msg->input, &msg->parsed, &val)) + return PARSE_ERROR; if (arr) arr[i] = (CK_ULONG)val; }