summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-10-16 14:48:01 +0100
committerRoy Marples <roy@marples.name>2019-10-16 14:48:01 +0100
commit3e85e121caffe089023ea19c77b3ce295a18bf65 (patch)
treee309a98c911bc248ab81cca5498eedd83ab81053 /compat
parent29263035f3326a46d7baf86f63200b8118f425d1 (diff)
downloaddhcpcd-3e85e121caffe089023ea19c77b3ce295a18bf65.tar.xz
compat: Fix UB in arc4random.
Diffstat (limited to 'compat')
-rw-r--r--compat/arc4random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/arc4random.c b/compat/arc4random.c
index ab06df04..045e0234 100644
--- a/compat/arc4random.c
+++ b/compat/arc4random.c
@@ -90,7 +90,7 @@ arc4_getword(struct arc4_stream *as)
{
int val;
- val = arc4_getbyte(as) << 24;
+ val = (int)((unsigned int)arc4_getbyte(as) << 24);
val |= arc4_getbyte(as) << 16;
val |= arc4_getbyte(as) << 8;
val |= arc4_getbyte(as);