aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_http_post.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:36:38 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:36:38 +0000
commitd69c554bf4ab96d713b9f58fb22ea449cfd5901b (patch)
tree72e9f08d12cb63bcead8c9313eb1bebdd41d5469 /res/res_http_post.c
parenta6751112c3f5effd6608e8fb9dc7afce7b64a05e (diff)
AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211580 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_http_post.c')
-rw-r--r--res/res_http_post.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_http_post.c b/res/res_http_post.c
index 9c8e06de5..1a96d5a1d 100644
--- a/res/res_http_post.c
+++ b/res/res_http_post.c
@@ -315,7 +315,7 @@ static struct ast_str *http_post_callback(struct ast_tcptls_session_instance *se
continue;
}
- if (sscanf(var->value, "%lx", &ident) != 1) {
+ if (sscanf(var->value, "%30lx", &ident) != 1) {
return ast_http_error((*status = 400),
(*title = ast_strdup("Bad Request")),
NULL, "The was an error parsing the request.");
@@ -345,7 +345,7 @@ static struct ast_str *http_post_callback(struct ast_tcptls_session_instance *se
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);