diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-08-10 19:20:57 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-08-10 19:20:57 +0000 |
commit | 642bec4d6fea7afad99b6a4853418081137a48ba (patch) | |
tree | 2596a6cb913ad8bd78e4670d298dc1d4682b2d23 /res/res_http_post.c | |
parent | 41894bea92b7d2079fd666a3186b84ff92a5e0e5 (diff) |
AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_http_post.c')
-rw-r--r-- | res/res_http_post.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_http_post.c b/res/res_http_post.c index 74e249b33..4a3416252 100644 --- a/res/res_http_post.c +++ b/res/res_http_post.c @@ -320,7 +320,7 @@ static int http_post_callback(struct ast_tcptls_session_instance *ser, const str cookies = ast_http_get_cookies(headers); for (var = cookies; var; var = var->next) { if (!strcasecmp(var->name, "mansession_id")) { - sscanf(var->value, "%lx", &ident); + sscanf(var->value, "%30lx", &ident); break; } } @@ -347,7 +347,7 @@ static int http_post_callback(struct ast_tcptls_session_instance *ser, const str fprintf(f, "%s: %s\r\n", var->name, var->value); if (!strcasecmp(var->name, "Content-Length")) { - if ((sscanf(var->value, "%u", &content_len)) != 1) { + if ((sscanf(var->value, "%30u", &content_len)) != 1) { ast_log(LOG_ERROR, "Invalid Content-Length in POST request!\n"); fclose(f); ast_http_error(ser, 500, "Internal server error", "Invalid Content-Length in POST request!"); |