[vlc-devel] commit: Avoid segfault (Christophe Mutricy )

git version control git at videolan.org
Mon Oct 6 00:21:31 CEST 2008


vlc | branch: master | Christophe Mutricy <xtophe at videolan.org> | Sun Oct  5 17:03:37 2008 +0100| [c34851dcfe096551455a4e7b47f6967b60f248c9] | committer: Christophe Mutricy 

Avoid segfault

Fix #2159

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

 modules/access/mms/mmsh.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c
index 5f1f3c2..87bb09b 100644
--- a/modules/access/mms/mmsh.c
+++ b/modules/access/mms/mmsh.c
@@ -187,6 +187,9 @@ int MMSHOpen( access_t *p_access )
 
         input_thread_t * p_input = vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT );
         input_item_t * p_new_loc;
+
+        if( !p_input )
+            return VLC_EGENERIC;
         /** \bug we do not autodelete here */
         p_new_loc = input_item_New( p_access, psz_location, psz_location );
         input_item_AddSubItem( input_GetItem( p_input ), p_new_loc );




More information about the vlc-devel mailing list