[vlc-commits] activex: vlccontrol: Fix potential crash

Hugo Beauzée-Luyssen git at videolan.org
Fri Apr 17 15:40:04 CEST 2015


npapi-vlc | branch: cleanup | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Apr 17 15:28:17 2015 +0200| [c76f82b7be4b272c80ee9be1b7f2cdcc868824ae] | committer: Hugo Beauzée-Luyssen

activex: vlccontrol: Fix potential crash

Fix cid #59955

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

 activex/vlccontrol2.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
index e24e1eb..0b5a352 100644
--- a/activex/vlccontrol2.cpp
+++ b/activex/vlccontrol2.cpp
@@ -511,6 +511,8 @@ STDMETHODIMP VLCDeinterlace::disable()
 STDMETHODIMP VLCDeinterlace::enable(BSTR mode)
 {
     char *psz_mode = CStrFromBSTR(CP_UTF8, mode);
+    if ( psz_mode == nullptr )
+        return E_OUTOFMEMORY;
     _plug->get_player().get_mp().setDeinterlace( psz_mode );
     CoTaskMemFree(psz_mode);
     return S_OK;



More information about the vlc-commits mailing list