From e803711bbd6fab43214d166d5064a7f19154b8b6 Mon Sep 17 00:00:00 2001 From: uau Date: Thu, 1 Nov 2007 06:52:44 +0000 Subject: 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24926 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_scaletempo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libaf/af_scaletempo.c b/libaf/af_scaletempo.c index b25e8413e8..8e117b2a17 100644 --- a/libaf/af_scaletempo.c +++ b/libaf/af_scaletempo.c @@ -434,7 +434,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg) *(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}, -- cgit v1.2.3