]> git.sesse.net Git - vlc/commitdiff
rand: ASCII path, use utf8_open for close-on-exec
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Oct 2009 20:40:33 +0000 (23:40 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Oct 2009 20:42:11 +0000 (23:42 +0300)
src/misc/rand.c

index 81bc1850b3300b7466009659dc1301aa538b7bc1..ab257741dff06c7db6133ea8d2d6185b37bcab24 100644 (file)
@@ -35,6 +35,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <pthread.h>
+#include <vlc_charset.h>
 
 #include <vlc_md5.h>
 
@@ -57,7 +58,7 @@ static void vlc_rand_init (void)
     uint8_t key[BLOCK_SIZE];
 
     /* Get non-predictible value as key for HMAC */
-    int fd = open (randfile, O_RDONLY);
+    int fd = utf8_open (randfile, O_RDONLY);
     if (fd == -1)
         return; /* Uho! */