Suppress UBSan warnings in the xoshiro implementation.
authorGuus Sliepen <guus@tinc-vpn.org>
Mon, 23 Aug 2021 16:42:09 +0000 (18:42 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Mon, 23 Aug 2021 22:50:07 +0000 (00:50 +0200)
Xoshiro relies on the well defined overflow behavior of unsigned
integer, but UBSan complains about it unless we force it to ignore it.

.ci/sanitizers/ignore.txt
src/autoconnect.c

index 7295aeb..724f278 100644 (file)
@@ -1,2 +1,3 @@
 src:ed25519/*
 src:chacha-poly1305/*
+src:xoshiro.c
index 1609363..9f4abec 100644 (file)
@@ -48,7 +48,8 @@ static void make_new_connection() {
                        continue;
                }
 
-               if(r--) {
+               if(r) {
+                       --r;
                        continue;
                }