mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-06 09:59:20 +00:00
Merged revisions 106139 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r106139 | tilghman | 2008-03-05 11:40:42 -0600 (Wed, 05 Mar 2008) | 3 lines Should check these values for non-NULL before scanning. (Closes issue #12147) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@106140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -83,11 +83,11 @@ static int background_detect_exec(struct ast_channel *chan, void *data)
|
|||||||
tmp = ast_strdupa(data);
|
tmp = ast_strdupa(data);
|
||||||
AST_STANDARD_APP_ARGS(args, tmp);
|
AST_STANDARD_APP_ARGS(args, tmp);
|
||||||
|
|
||||||
if ((sscanf(args.silence, "%d", &x) == 1) && (x > 0))
|
if (!ast_strlen_zero(args.silence) && (sscanf(args.silence, "%d", &x) == 1) && (x > 0))
|
||||||
sil = x;
|
sil = x;
|
||||||
if ((sscanf(args.min, "%d", &x) == 1) && (x > 0))
|
if (!ast_strlen_zero(args.min) && (sscanf(args.min, "%d", &x) == 1) && (x > 0))
|
||||||
min = x;
|
min = x;
|
||||||
if ((sscanf(args.max, "%d", &x) == 1) && (x > 0))
|
if (!ast_strlen_zero(args.max) && (sscanf(args.max, "%d", &x) == 1) && (x > 0))
|
||||||
max = x;
|
max = x;
|
||||||
|
|
||||||
ast_debug(1, "Preparing detect of '%s', sil=%d, min=%d, max=%d\n", args.filename, sil, min, max);
|
ast_debug(1, "Preparing detect of '%s', sil=%d, min=%d, max=%d\n", args.filename, sil, min, max);
|
||||||
|
|||||||
Reference in New Issue
Block a user