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

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


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

oldrc: fix crash on memory error

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

 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 cd7295b..d824f50 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -2061,6 +2061,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