summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-02-29 09:48:12 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-02-29 10:31:56 +0100
commit370cdc0cc062e06d6974a199189303281a4db160 (patch)
tree63c397fb79eba6eea4c9ebfea91699fb6f0337a0
parent5ab0d2428036e0ffa4fe5f5c21c2fa22fc9b77da (diff)
downloadgnutls-370cdc0cc062e06d6974a199189303281a4db160.tar.gz
opencdk: Fixes to prevent undefined behavior (found with libubsan)
-rw-r--r--lib/opencdk/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/opencdk/misc.c b/lib/opencdk/misc.c
index 0d4ee89121..35172e5dd4 100644
--- a/lib/opencdk/misc.c
+++ b/lib/opencdk/misc.c
@@ -41,7 +41,7 @@ u32 _cdk_buftou32(const byte * buf)
if (!buf)
return 0;
- u = buf[0] << 24;
+ u = ((u32)buf[0]) << 24;
u |= buf[1] << 16;
u |= buf[2] << 8;
u |= buf[3];