[MPlayer-cvslog] r37137 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Sun Apr 6 20:46:45 CEST 2014


Author: reimar
Date: Sun Apr  6 20:46:45 2014
New Revision: 37137

Log:
mplayer: Fix potential NULL dereference.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Sun Apr  6 20:42:45 2014	(r37136)
+++ trunk/mplayer.c	Sun Apr  6 20:46:45 2014	(r37137)
@@ -548,7 +548,7 @@ static void print_file_properties(const 
         mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_START_TIME=%.2f\n", start_pts);
     else
         mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_START_TIME=unknown\n");
-    mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_LENGTH=%.2f\n", demuxer_get_time_length(mpctx->demuxer));
+    mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_LENGTH=%.2f\n", mpctx->demuxer ? demuxer_get_time_length(mpctx->demuxer) : 0);
     mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SEEKABLE=%d\n",
            mpctx->stream->seek && (!mpctx->demuxer || mpctx->demuxer->seekable));
     if (mpctx->demuxer) {


More information about the MPlayer-cvslog mailing list