[vlc-commits] oldrc: fix crash on memory error

Pierre Ynard git at videolan.org
Thu Jan 27 17:37:37 CET 2011


vlc/vlc-1.1 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Jan 27 17:33:33 2011 +0100| [32312b04fc055133a1a722c0de1e3e7201dc0aa9] | committer: Pierre Ynard

oldrc: fix crash on memory error
(cherry picked from commit ed9350a38676c62df562c483ecbc68d837d2cef8)

Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=32312b04fc055133a1a722c0de1e3e7201dc0aa9
---

 modules/control/rc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 62ca2a5..e3fca8c 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -2054,6 +2054,8 @@ static input_item_t *parse_MRL( intf_thread_t *p_intf, char *psz_mrl )
     if( !psz_mrl ) return 0;
 
     psz_mrl = psz_orig = strdup( psz_mrl );
+    if( !psz_mrl )
+        return NULL;
     while( *psz_mrl )
     {
         SKIPSPACE( psz_mrl );



More information about the vlc-commits mailing list