]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix crash on multiple thread random usage on systems without
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 21 Nov 2014 08:22:18 +0000 (08:22 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 21 Nov 2014 08:22:18 +0000 (08:22 +0000)
  arc4random.

git-svn-id: file:///svn/unbound/trunk@3277 be551aaa-1e26-0410-a405-d3ace91eadb9

compat/arc4_lock.c
doc/Changelog

index ce8bb4168d642cd0d9e8459d551dcd666857d08b..faa743d15baa0f9ed27774caf6dd62d92a189593 100644 (file)
@@ -53,8 +53,10 @@ static int arc4lockinit = 0;
 
 void _ARC4_LOCK(void)
 {
-       if(!arc4lockinit)
+       if(!arc4lockinit) {
+               arc4lockinit = 1;
                lock_quick_init(&arc4lock);
+       }
        lock_quick_lock(&arc4lock);
 }
 
index 4fdb898131a5340fa67f7a7d03446e0a4b710a7d..983c6d217f4cd289e97de81b07997fecb56402e4 100644 (file)
@@ -1,3 +1,7 @@
+21 November 2014: Wouter
+       - Fix crash on multiple thread random usage on systems without
+         arc4random.
+
 20 November 2014: Wouter
        - fix compat/getentropy_win.c check if CryptGenRandom works and no
          immediate exit on windows.