From dbef80dfa2752f6306e45af841d5573ccfd14f03 Mon Sep 17 00:00:00 2001 From: tilghman Date: Mon, 10 Aug 2009 19:25:03 +0000 Subject: AST-2009-005 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@211551 f38db490-d61c-443f-a65b-d21fe96a405b --- main/features.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'main/features.c') diff --git a/main/features.c b/main/features.c index 4c39db39a..5cd78b95a 100644 --- a/main/features.c +++ b/main/features.c @@ -438,7 +438,7 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan) * limitation here. If extout was not numeric, we could permit * arbitrary non-numeric extensions. */ - if (sscanf(parkingexten, "%d", &parking_space) != 1 || parking_space < 0) { + if (sscanf(parkingexten, "%30d", &parking_space) != 1 || parking_space < 0) { AST_LIST_UNLOCK(&parkinglot); ast_free(pu); ast_log(LOG_WARNING, "PARKINGEXTEN does not indicate a valid parking slot: '%s'.\n", parkingexten); @@ -3189,13 +3189,13 @@ static int load_config(void) } else if (!strcasecmp(var->name, "context")) { ast_copy_string(parking_con, var->value, sizeof(parking_con)); } else if (!strcasecmp(var->name, "parkingtime")) { - if ((sscanf(var->value, "%d", &parkingtime) != 1) || (parkingtime < 1)) { + if ((sscanf(var->value, "%30d", &parkingtime) != 1) || (parkingtime < 1)) { ast_log(LOG_WARNING, "%s is not a valid parkingtime\n", var->value); parkingtime = DEFAULT_PARK_TIME; } else parkingtime = parkingtime * 1000; } else if (!strcasecmp(var->name, "parkpos")) { - if (sscanf(var->value, "%d-%d", &start, &end) != 2) { + if (sscanf(var->value, "%30d-%30d", &start, &end) != 2) { ast_log(LOG_WARNING, "Format for parking positions is a-b, where a and b are numbers at line %d of features.conf\n", var->lineno); } else { parking_start = start; @@ -3236,24 +3236,24 @@ static int load_config(void) } else if (!strcasecmp(var->name, "adsipark")) { adsipark = ast_true(var->value); } else if (!strcasecmp(var->name, "transferdigittimeout")) { - if ((sscanf(var->value, "%d", &transferdigittimeout) != 1) || (transferdigittimeout < 1)) { + if ((sscanf(var->value, "%30d", &transferdigittimeout) != 1) || (transferdigittimeout < 1)) { ast_log(LOG_WARNING, "%s is not a valid transferdigittimeout\n", var->value); transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT; } else transferdigittimeout = transferdigittimeout * 1000; } else if (!strcasecmp(var->name, "featuredigittimeout")) { - if ((sscanf(var->value, "%d", &featuredigittimeout) != 1) || (featuredigittimeout < 1)) { + if ((sscanf(var->value, "%30d", &featuredigittimeout) != 1) || (featuredigittimeout < 1)) { ast_log(LOG_WARNING, "%s is not a valid featuredigittimeout\n", var->value); featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT; } } else if (!strcasecmp(var->name, "atxfernoanswertimeout")) { - if ((sscanf(var->value, "%d", &atxfernoanswertimeout) != 1) || (atxfernoanswertimeout < 1)) { + if ((sscanf(var->value, "%30d", &atxfernoanswertimeout) != 1) || (atxfernoanswertimeout < 1)) { ast_log(LOG_WARNING, "%s is not a valid atxfernoanswertimeout\n", var->value); atxfernoanswertimeout = DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER; } else atxfernoanswertimeout = atxfernoanswertimeout * 1000; } else if (!strcasecmp(var->name, "atxferloopdelay")) { - if ((sscanf(var->value, "%u", &atxferloopdelay) != 1)) { + if ((sscanf(var->value, "%30u", &atxferloopdelay) != 1)) { ast_log(LOG_WARNING, "%s is not a valid atxferloopdelay\n", var->value); atxferloopdelay = DEFAULT_ATXFER_LOOP_DELAY; } else @@ -3261,7 +3261,7 @@ static int load_config(void) } else if (!strcasecmp(var->name, "atxferdropcall")) { atxferdropcall = ast_true(var->value); } else if (!strcasecmp(var->name, "atxfercallbackretries")) { - if ((sscanf(var->value, "%u", &atxferloopdelay) != 1)) { + if ((sscanf(var->value, "%30u", &atxferloopdelay) != 1)) { ast_log(LOG_WARNING, "%s is not a valid atxfercallbackretries\n", var->value); atxfercallbackretries = DEFAULT_ATXFER_CALLBACK_RETRIES; } @@ -3832,7 +3832,7 @@ static int manager_park(struct mansession *s, const struct message *m) } if (!ast_strlen_zero(timeout)) { - sscanf(timeout, "%d", &to); + sscanf(timeout, "%30d", &to); } res = ast_masq_park_call(ch1, ch2, to, &parkExt); -- cgit v1.2.3