# HG changeset patch # User uau # Date 1193899964 0 # Node ID 0701957d2bf7c8f87a336d46f672a42780590274 # Parent d4a8f31df9ba7f7e56ba6c5aa17395a8e4b3643b 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. diff -r d4a8f31df9ba -r 0701957d2bf7 libaf/af_scaletempo.c --- a/libaf/af_scaletempo.c Thu Nov 01 06:52:41 2007 +0000 +++ b/libaf/af_scaletempo.c Thu Nov 01 06:52:44 2007 +0000 @@ -434,7 +434,7 @@ *(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},