[vlc-commits] vout: fix use-after-free, wait on correct date
Rémi Denis-Courmont
git at videolan.org
Wed Oct 21 20:22:21 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct 21 21:14:16 2015 +0300| [dfefe47ff25ace43f1ac1fad7fa652c8b99eb1f6] | committer: Rémi Denis-Courmont
vout: fix use-after-free, wait on correct date
The mwait() call dereferenced a potentially no longer referenced picture
(if the display was filtered).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dfefe47ff25ace43f1ac1fad7fa652c8b99eb1f6
---
src/video_output/video_output.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 937b305..ae9edfe 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -981,6 +981,8 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
subpicture_Delete(subpic);
return VLC_EGENERIC;
}
+
+ todisplay = sys->display.filtered;
}
vout_chrono_Stop(&vout->p->render);
@@ -1004,10 +1006,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
/* Display the direct buffer returned by vout_RenderPicture */
vout->p->displayed.date = mdate();
- vout_display_Display(vd,
- sys->display.filtered ? sys->display.filtered
- : todisplay,
- subpic);
+ vout_display_Display(vd, todisplay, subpic);
sys->display.filtered = NULL;
vout_statistic_AddDisplayed(&vout->p->statistic, 1);
More information about the vlc-commits
mailing list