[gnome-keyring/wip/dueno/ubsan: 3/3] pkcs11: Fix load of misaligned address
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/wip/dueno/ubsan: 3/3] pkcs11: Fix load of misaligned address
- Date: Mon, 16 Sep 2019 14:35:45 +0000 (UTC)
commit 59f7cca55228284130508edc59f90e6206950e17
Author: Daiki Ueno <dueno src gnome org>
Date: Mon Sep 16 16:34:30 2019 +0200
pkcs11: Fix load of misaligned address
pkcs11/gkm/gkm-attributes.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pkcs11/gkm/gkm-attributes.c b/pkcs11/gkm/gkm-attributes.c
index fb185bc0..d9f0dbd5 100644
--- a/pkcs11/gkm/gkm-attributes.c
+++ b/pkcs11/gkm/gkm-attributes.c
@@ -538,8 +538,10 @@ gkm_attributes_find_ulong (CK_ATTRIBUTE_PTR attrs, CK_ULONG n_attrs, CK_ATTRIBUT
if (attr->ulValueLen != sizeof (CK_ULONG))
return FALSE;
- if (value != NULL)
- *value = *((CK_ULONG*)attr->pValue);
+ if (value != NULL) {
+ CK_ULONG *ulong = attr->pValue;
+ *value = *ulong;
+ }
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]