mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -277,15 +277,15 @@ static int exec(struct ast_channel *chan, void *data, int dahdimode)
|
||||
|
||||
if (!ast_strlen_zero(data)) {
|
||||
if (dahdimode) {
|
||||
if ((sscanf(data, "DAHDI/%d", &confno) != 1) &&
|
||||
(sscanf(data, "%d", &confno) != 1)) {
|
||||
if ((sscanf(data, "DAHDI/%30d", &confno) != 1) &&
|
||||
(sscanf(data, "%30d", &confno) != 1)) {
|
||||
ast_log(LOG_WARNING, "Argument (if specified) must be a channel number, not '%s'\n", (char *) data);
|
||||
ast_module_user_remove(u);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if ((sscanf(data, "Zap/%d", &confno) != 1) &&
|
||||
(sscanf(data, "%d", &confno) != 1)) {
|
||||
if ((sscanf(data, "Zap/%30d", &confno) != 1) &&
|
||||
(sscanf(data, "%30d", &confno) != 1)) {
|
||||
ast_log(LOG_WARNING, "Argument (if specified) must be a channel number, not '%s'\n", (char *) data);
|
||||
ast_module_user_remove(u);
|
||||
return 0;
|
||||
@@ -301,7 +301,7 @@ static int exec(struct ast_channel *chan, void *data, int dahdimode)
|
||||
confstr[0] = '\0';
|
||||
res = ast_app_getdata(chan, "conf-getchannel",confstr, sizeof(confstr) - 1, 0);
|
||||
if (res <0) goto out;
|
||||
if (sscanf(confstr, "%d", &confno) != 1)
|
||||
if (sscanf(confstr, "%30d", &confno) != 1)
|
||||
confno = 0;
|
||||
}
|
||||
if (confno) {
|
||||
|
Reference in New Issue
Block a user