Mercurial > mplayer.hg
changeset 24898:0701957d2bf7
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.
author | uau |
---|---|
date | Thu, 01 Nov 2007 06:52:44 +0000 |
parents | d4a8f31df9ba |
children | 3245638ab801 |
files | libaf/af_scaletempo.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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},