From 7219e78b554a7b7e792a344b0c6cf133affe88b2 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Mon, 27 Aug 2018 17:11:45 -0400 Subject: fix pkey_remote_get_attributes --- rpc_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc_client.c b/rpc_client.c index eb3333e..dd38506 100644 --- a/rpc_client.c +++ b/rpc_client.c @@ -902,7 +902,7 @@ static hal_error_t pkey_remote_get_attributes(const hal_pkey_handle_t pkey, { /* inbuf[] here includes one extra word per attribute for padding */ uint8_t outbuf[nargs(5 + attributes_len)], *optr = outbuf, *olimit = outbuf + sizeof(outbuf); - uint8_t inbuf[nargs(3 + 3 * attributes_len) + attributes_buffer_len]; + uint8_t inbuf[nargs(4 + 3 * attributes_len) + attributes_buffer_len]; const uint8_t *iptr = inbuf, *ilimit = inbuf + sizeof(inbuf); hal_client_handle_t dummy_client = {0}; hal_error_t rpc_ret; @@ -939,7 +939,7 @@ static hal_error_t pkey_remote_get_attributes(const hal_pkey_handle_t pkey, check(hal_xdr_decode_variable_opaque(&iptr, ilimit, abuf, &len)); attributes[i].value = abuf; attributes[i].length = len; - abuf += u32; + abuf += len; } } } -- cgit v1.2.3