[Cryptech-Commits] [sw/libhal] branch master updated: fix pkey_remote_get_attributes

git at cryptech.is git at cryptech.is
Mon Aug 27 21:11:52 UTC 2018


This is an automated email from the git hooks/post-receive script.

paul at psgd.org pushed a commit to branch master
in repository sw/libhal.

The following commit(s) were added to refs/heads/master by this push:
     new 7219e78  fix pkey_remote_get_attributes
7219e78 is described below

commit 7219e78b554a7b7e792a344b0c6cf133affe88b2
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Mon Aug 27 17:11:45 2018 -0400

    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;
       }
     }
   }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list