]> granicus.if.org Git - p11-kit/commitdiff
build: Check return value of p11_rpc_buffer_get_uint64
authorDaiki Ueno <dueno@redhat.com>
Tue, 16 Oct 2018 16:16:12 +0000 (18:16 +0200)
committerDaiki Ueno <ueno@gnu.org>
Wed, 17 Oct 2018 08:13:32 +0000 (10:13 +0200)
p11-kit/rpc-client.c

index 0dd45255b1aa4315c146445d4201b5ed590eda30..e202e37f0b5fe9d0de343c17b15482625cb47a08 100644 (file)
@@ -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;
        }