From: Jonathan Rose Date: Mon, 9 May 2011 14:37:10 +0000 (+0000) Subject: Minor change to 318141 to improve parsing behavior. X-Git-Tag: 11.0.0-beta1~1590 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff4c7d46c02f412717fb10e718b112be0a76d301;p=thirdparty%2Fasterisk.git Minor change to 318141 to improve parsing behavior. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318193 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/features.c b/main/features.c index 4850f1c876..37491ccec0 100644 --- a/main/features.c +++ b/main/features.c @@ -4501,7 +4501,11 @@ static int park_exec_full(struct ast_channel *chan, const char *data) const char *lotname_split = NULL; /* name of the parking lot if an '@' symbol is included in data */ if (data) { - sscanf(data, "%d", &park); + if (sscanf(data, "%u", &park) != 1) { + /* Something went wrong when parsing the extension */ + ast_log(LOG_WARNING, "Could not parse extension from '%s'\n", data); + return -1; + } if ((lotname_split = strchr(data, (int)'@'))) { lotname_split++; }