[vlc-commits] mmdevice: fix ToCToU between Open() and MMSession()

Rémi Denis-Courmont git at videolan.org
Thu Mar 1 10:29:00 CET 2018


vlc/vlc-3.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 28 20:10:24 2018 +0200| [da7e9073f4efaa3254fd4cb4a01e2bea9387dc03] | committer: Thomas Guillem

mmdevice: fix ToCToU between Open() and MMSession()

(cherry picked from commit 1d43675e3724443dee959624c791d51354b8ffef)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=da7e9073f4efaa3254fd4cb4a01e2bea9387dc03
---

 modules/audio_output/mmdevice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index fe69b5a883..4a8b6ccc18 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -1274,7 +1274,7 @@ static int Open(vlc_object_t *obj)
     sys->acquired_device = NULL;
     sys->request_device_restart = false;
 
-    if (!var_InheritBool(aout, "volume-save"))
+    if (!var_CreateGetBool(aout, "volume-save"))
         VolumeSetLocked(aout, var_InheritFloat(aout, "mmdevice-volume"));
 
     InitializeCriticalSection(&sys->lock);



More information about the vlc-commits mailing list