diff options
Diffstat (limited to 'codecs/codec_speex.c')
-rw-r--r-- | codecs/codec_speex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c index 6eff087d3..c2b4a4369 100644 --- a/codecs/codec_speex.c +++ b/codecs/codec_speex.c @@ -402,7 +402,7 @@ static void parse_config(void) } else ast_log(LOG_ERROR,"Error! Complexity must be 0-10\n"); } else if (!strcasecmp(var->name, "vbr_quality")) { - if (sscanf(var->value, "%f", &res_f) == 1 && res_f >= 0 && res_f <= 10) { + if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0 && res_f <= 10) { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Setting VBR Quality to %f\n",res_f); vbr_quality = res_f; @@ -451,7 +451,7 @@ static void parse_config(void) if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Preprocessor AGC. [%s]\n",pp_agc ? "on" : "off"); } else if (!strcasecmp(var->name, "pp_agc_level")) { - if (sscanf(var->value, "%f", &res_f) == 1 && res_f >= 0) { + if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Setting preprocessor AGC Level to %f\n",res_f); pp_agc_level = res_f; @@ -466,14 +466,14 @@ static void parse_config(void) if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Preprocessor Dereverb. [%s]\n",pp_dereverb ? "on" : "off"); } else if (!strcasecmp(var->name, "pp_dereverb_decay")) { - if (sscanf(var->value, "%f", &res_f) == 1 && res_f >= 0) { + if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Setting preprocessor Dereverb Decay to %f\n",res_f); pp_dereverb_decay = res_f; } else ast_log(LOG_ERROR,"Error! Preprocessor Dereverb Decay must be >= 0\n"); } else if (!strcasecmp(var->name, "pp_dereverb_level")) { - if (sscanf(var->value, "%f", &res_f) == 1 && res_f >= 0) { + if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Setting preprocessor Dereverb Level to %f\n",res_f); pp_dereverb_level = res_f; |