[gnome-keyring] rpc-layer: Fix integer size mismatch on amd64
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] rpc-layer: Fix integer size mismatch on amd64
- Date: Fri, 9 Dec 2011 14:09:55 +0000 (UTC)
commit d51c4a634fb0760f4ff5a79b02b855aab8ab4e38
Author: Stef Walter <stefw collabora co uk>
Date: Fri Dec 9 15:06:45 2011 +0100
rpc-layer: Fix integer size mismatch on amd64
* This was manifested by a problem returning the size of a
C_Sign operation
* sizeof (size_t) != sizeof (uint32_t)
pkcs11/rpc-layer/gkm-rpc-module.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pkcs11/rpc-layer/gkm-rpc-module.c b/pkcs11/rpc-layer/gkm-rpc-module.c
index 4c235f6..ea939a7 100644
--- a/pkcs11/rpc-layer/gkm-rpc-module.c
+++ b/pkcs11/rpc-layer/gkm-rpc-module.c
@@ -750,6 +750,7 @@ proto_read_byte_array (GkmRpcMessage *msg, CK_BYTE_PTR arr,
{
const unsigned char *val;
unsigned char valid;
+ uint32_t length;
size_t vlen;
assert (len);
@@ -764,10 +765,10 @@ proto_read_byte_array (GkmRpcMessage *msg, CK_BYTE_PTR arr,
/* If not valid, then just the length is encoded, this can signify CKR_BUFFER_TOO_SMALL */
if (!valid) {
- if (!egg_buffer_get_uint32 (&msg->buffer, msg->parsed, &msg->parsed, (uint32_t *)&vlen))
+ if (!egg_buffer_get_uint32 (&msg->buffer, msg->parsed, &msg->parsed, &length))
return PARSE_ERROR;
- *len = vlen;
+ *len = length;
if (arr)
return CKR_BUFFER_TOO_SMALL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]