aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2018-08-27 17:11:45 -0400
committerPaul Selkirk <paul@psgd.org>2018-08-27 17:11:45 -0400
commit7219e78b554a7b7e792a344b0c6cf133affe88b2 (patch)
treed7e462dce360d96521791f2d2637aa998846454f
parentcd7b69c812a281845fa05359ee8c24dc1ef147ca (diff)
fix pkey_remote_get_attributes
-rw-r--r--rpc_client.c4
1 files 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;
}
}
}