summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-10-16 18:16:12 +0200
committerDaiki Ueno <ueno@gnu.org>2018-10-17 10:13:32 +0200
commit213ea0815ef45411bf6c134918b79d2aad69c1dc (patch)
tree191f2c9bfb1926b6293a346a886db6454d495101
parent06323aed926ddc67bd18ed98e5af92035a8e3d39 (diff)
build: Check return value of p11_rpc_buffer_get_uint64
-rw-r--r--p11-kit/rpc-client.c3
1 files changed, 2 insertions, 1 deletions
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;
}