]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Fix left shifting issues noticed by sanitizer
authorBaptiste Daroussin <bapt@FreeBSD.org>
Mon, 9 Jan 2023 13:40:16 +0000 (14:40 +0100)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Mon, 9 Jan 2023 13:40:16 +0000 (14:40 +0100)
src/random-int.c

index 24a65c63920ea2a0f93b341bf8e9809b3609d123..b58b972cf847e18bf0f5059881ecb83985160d2d 100644 (file)
@@ -26,6 +26,7 @@
 #include <unistd.h>
 #include <limits.h>
 #include <time.h>
+#include <stdint.h>
 
 #include "wrappers.h"
 #include "config.h"
@@ -36,7 +37,7 @@ int random_int()
        static int init = 0;
        unsigned int seed;
        int devrandom;
-       unsigned char ch;
+       uint32_t ch;
 
        if (init) return rand();