[vlc-commits] chromecast: increase lock range

Thomas Guillem git at videolan.org
Thu Feb 22 12:00:04 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 20 18:18:37 2018 +0100| [019c77813de3f587a71d4d63ed9dadbe074307fa] | committer: Thomas Guillem

chromecast: increase lock range

This could lead to a use-after-free of the header block.

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

 modules/stream_out/chromecast/cast.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 1f85e8e8a3..ee6f7cb578 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -438,7 +438,6 @@ int sout_access_out_sys_t::url_cb(httpd_client_t *cl, httpd_message_t *answer,
         fifo_put_back(p_block);
         p_block = m_header;
     }
-    vlc_fifo_Unlock(m_fifo);
 
     if (vlc_fifo_GetBytes(m_fifo) < HTTPD_BUFFER_PACE)
         m_intf->setPacing(false);
@@ -470,6 +469,7 @@ int sout_access_out_sys_t::url_cb(httpd_client_t *cl, httpd_message_t *answer,
     else
         httpd_MsgAdd(answer, "Connection", "close");
 
+    vlc_fifo_Unlock(m_fifo);
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list