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

git version control git at videolan.org
Mon Oct 6 15:46:44 CEST 2008


vlc | branch: 0.9-bugfix | Christophe Mutricy <xtophe at videolan.org> | Sun Oct  5 17:03:37 2008 +0100| [fc7a0751efe3f13ec72df4d56065f6be7da2a862] | committer: Derk-Jan Hartman 

Avoid segfault

Fix #2159
(cherry picked from commit c34851dcfe096551455a4e7b47f6967b60f248c9)

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

 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