mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 12:25:35 +00:00
AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@211569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1585,7 +1585,7 @@ static int action_waitevent(struct mansession *s, const struct message *m)
|
||||
idText[0] = '\0';
|
||||
|
||||
if (!ast_strlen_zero(timeouts)) {
|
||||
sscanf(timeouts, "%i", &timeout);
|
||||
sscanf(timeouts, "%30i", &timeout);
|
||||
if (timeout < -1)
|
||||
timeout = -1;
|
||||
/* XXX maybe put an upper bound, or prevent the use of 0 ? */
|
||||
@@ -2071,7 +2071,7 @@ static int action_redirect(struct mansession *s, const struct message *m)
|
||||
astman_send_error(s, m, "Channel not specified");
|
||||
return 0;
|
||||
}
|
||||
if (!ast_strlen_zero(priority) && (sscanf(priority, "%d", &pi) != 1)) {
|
||||
if (!ast_strlen_zero(priority) && (sscanf(priority, "%30d", &pi) != 1)) {
|
||||
if ((pi = ast_findlabel_extension(NULL, context, exten, priority, NULL)) < 1) {
|
||||
astman_send_error(s, m, "Invalid priority");
|
||||
return 0;
|
||||
@@ -2392,13 +2392,13 @@ static int action_originate(struct mansession *s, const struct message *m)
|
||||
astman_send_error(s, m, "Channel not specified");
|
||||
return 0;
|
||||
}
|
||||
if (!ast_strlen_zero(priority) && (sscanf(priority, "%d", &pi) != 1)) {
|
||||
if (!ast_strlen_zero(priority) && (sscanf(priority, "%30d", &pi) != 1)) {
|
||||
if ((pi = ast_findlabel_extension(NULL, context, exten, priority, NULL)) < 1) {
|
||||
astman_send_error(s, m, "Invalid priority");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (!ast_strlen_zero(timeout) && (sscanf(timeout, "%d", &to) != 1)) {
|
||||
if (!ast_strlen_zero(timeout) && (sscanf(timeout, "%30d", &to) != 1)) {
|
||||
astman_send_error(s, m, "Invalid timeout");
|
||||
return 0;
|
||||
}
|
||||
@@ -3780,7 +3780,7 @@ static struct ast_str *generic_http_callback(enum output_format format,
|
||||
|
||||
for (v = params; v; v = v->next) {
|
||||
if (!strcasecmp(v->name, "mansession_id")) {
|
||||
sscanf(v->value, "%x", &ident);
|
||||
sscanf(v->value, "%30x", &ident);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user