diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 19:20:57 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 19:20:57 +0000 |
commit | d1ec1aa57d296243d584ad268d8e61d7d1998569 (patch) | |
tree | 2596a6cb913ad8bd78e4670d298dc1d4682b2d23 /main/manager.c | |
parent | 4548c33d84f71a04a0416a26b9f0dea0ae061cc4 (diff) |
AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/manager.c b/main/manager.c index f4d9e1e6f..f6501c5e0 100644 --- a/main/manager.c +++ b/main/manager.c @@ -2474,7 +2474,7 @@ static int action_waitevent(struct mansession *s, const struct message *m) } if (!ast_strlen_zero(timeouts)) { - sscanf(timeouts, "%i", &timeout); + sscanf(timeouts, "%30i", &timeout); if (timeout < -1) { timeout = -1; } @@ -2962,7 +2962,7 @@ static int action_redirect(struct mansession *s, const struct message *m) 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; @@ -3270,13 +3270,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; } @@ -4731,7 +4731,7 @@ static int generic_http_callback(struct ast_tcptls_session_instance *ser, cookies = ast_http_get_cookies(headers); for (v = cookies; v; v = v->next) { if (!strcasecmp(v->name, "mansession_id")) { - sscanf(v->value, "%x", &ident); + sscanf(v->value, "%30x", &ident); break; } } @@ -4988,7 +4988,7 @@ static int auth_http_callback(struct ast_tcptls_session_instance *ser, nonce = 0; goto out_401; } - if (sscanf(d.nonce, "%lx", &nonce) != 1) { + if (sscanf(d.nonce, "%30lx", &nonce) != 1) { ast_log(LOG_WARNING, "Received incorrect nonce in Digest <%s>\n", d.nonce); nonce = 0; goto out_401; @@ -5094,7 +5094,7 @@ static int auth_http_callback(struct ast_tcptls_session_instance *ser, stale = 1; goto out_401; } else { - sscanf(d.nc, "%lx", &nc); + sscanf(d.nc, "%30lx", &nc); if (session->nc >= nc || ((time_now - session->noncetime) > 62) ) { /* * Nonce time expired (> 2 minutes) or something wrong with nonce |