[MPlayer-cvslog] r27412 - trunk/command.c

ben subversion at mplayerhq.hu
Mon Aug 4 15:33:23 CEST 2008


Author: ben
Date: Mon Aug  4 15:33:22 2008
New Revision: 27412

Log:
Fixes unsafe 'angle' command with get_property() call.
Without it, MPlayer segv trying to dereference NULL demuxer.
Patch by Mathieu Schroeter (mathieu dot schroeter at gamesover dot ch)



Modified:
   trunk/command.c

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	(original)
+++ trunk/command.c	Mon Aug  4 15:33:22 2008
@@ -450,10 +450,11 @@ static int mp_property_chapter(m_option_
 static int mp_property_angle(m_option_t *prop, int action, void *arg,
                                MPContext *mpctx)
 {
-    int angle;
+    int angle = -1;
     int angles;
     char *angle_name = NULL;
 
+    if (mpctx->demuxer)
     angle = demuxer_get_current_angle(mpctx->demuxer);
     if (angle < 0)
         return M_PROPERTY_UNAVAILABLE;



More information about the MPlayer-cvslog mailing list