[vlc-commits] [Git][videolan/vlc][master] audio_output: filters: fix use-after-free on vout_Request failure

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Dec 18 07:48:27 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ffdf28bb by Abderhman Gamal at 2025-12-18T07:23:24+00:00
audio_output: filters: fix use-after-free on vout_Request failure

If vout_Request() fails, the clock is destroyed. However, the code
continued to assign the freed clock pointer to owner_sys->clock.

This patch adds an early return on failure to prevent the use-after-free
and ensures owner_sys members are only updated on success.

Fixes #29371

Signed-off-by: Abderhman Gamal <abderhmangamal246 at gmail.com>

- - - - -


1 changed file:

- src/audio_output/filters.c


Changes:

=====================================
src/audio_output/filters.c
=====================================
@@ -438,8 +438,8 @@ vout_thread_t *aout_filter_GetVout(filter_t *filter, const video_format_t *fmt)
 
     if (vout_Request(&cfg, NULL, NULL)) {
         vout_Close(vout);
-        vout = NULL;
         vlc_clock_Delete(clock);
+        return NULL;
     }
 
     owner_sys->clock = clock;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ffdf28bbe2e46569512bbe64000f01d1123c6301

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ffdf28bbe2e46569512bbe64000f01d1123c6301
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list