Commit 95c844b6 authored by Cheng Sun's avatar Cheng Sun Committed by Jean-Baptiste Kempf

XCB windowless: fix buffer size validation

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent d41934d6
......@@ -101,8 +101,9 @@ bool VlcWindowlessXCB::handle_event(void *event)
drawBackground(xgeevent->drawable);
/* Validate video size */
if (m_media_width == 0 || m_media_height == 0)
/* Validate video buffer size */
if (m_frame_buf.empty() ||
m_frame_buf.size() < m_media_width * m_media_height * DEF_PIXEL_BYTES)
break;
/* Compute the position of the video */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment