[MPlayer-cvslog] r24926 - trunk/libaf/af_scaletempo.c

uau subversion at mplayerhq.hu
Thu Nov 1 07:52:45 CET 2007


Author: uau
Date: Thu Nov  1 07:52:44 2007
New Revision: 24926

Log:
af_scaletempo: Fix crash in option parsing

The value of the "speed" suboption was not initialized before calling
subopt_parse(). If the command line had suboptions but "speed" was not
one of them then the code accessed an uninitialized pointer and
possibly crashed. Fixed by initializing the option value.


Modified:
   trunk/libaf/af_scaletempo.c

Modified: trunk/libaf/af_scaletempo.c
==============================================================================
--- trunk/libaf/af_scaletempo.c	(original)
+++ trunk/libaf/af_scaletempo.c	Thu Nov  1 07:52:44 2007
@@ -434,7 +434,7 @@ static int control(struct af_instance_s*
     *(float*)arg = s->scale;
     return AF_OK;
   case AF_CONTROL_COMMAND_LINE:{
-    strarg_t speed;
+    strarg_t speed = {};
     opt_t subopts[] = {
       {"scale",   OPT_ARG_FLOAT, &s->scale_nominal, NULL},
       {"stride",  OPT_ARG_FLOAT, &s->ms_stride, NULL},



More information about the MPlayer-cvslog mailing list