diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 19:25:03 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 19:25:03 +0000 |
commit | dbef80dfa2752f6306e45af841d5573ccfd14f03 (patch) | |
tree | 638d77074098ba848a915b044a9c6b4d12efb4ca /main/acl.c | |
parent | 55ecd87dff70a3ca8ff715adae8d95b68c238e26 (diff) |
AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@211551 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/acl.c')
-rw-r--r-- | main/acl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/main/acl.c b/main/acl.c index 54747de5f..731de5cc6 100644 --- a/main/acl.c +++ b/main/acl.c @@ -291,7 +291,7 @@ struct ast_ha *ast_append_ha(const char *sense, const char *stuff, struct ast_ha nm++; if (!strchr(nm, '.')) { - if ((sscanf(nm, "%d", &x) == 1) && (x >= 0) && (x <= 32)) + if ((sscanf(nm, "%30d", &x) == 1) && (x >= 0) && (x <= 32)) ha->netmask.s_addr = htonl(0xFFFFFFFF << (32 - x)); else { ast_log(LOG_WARNING, "Invalid CIDR in %s\n", stuff); @@ -413,14 +413,14 @@ static const struct dscp_codepoint dscp_pool1[] = { int ast_str2cos(const char *value, unsigned int *cos) { int fval; - - if (sscanf(value, "%d", &fval) == 1) { + + if (sscanf(value, "%30d", &fval) == 1) { if (fval < 8) { - *cos = fval; + *cos = fval; return 0; } } - + return -1; } @@ -429,7 +429,7 @@ int ast_str2tos(const char *value, unsigned int *tos) int fval; unsigned int x; - if (sscanf(value, "%i", &fval) == 1) { + if (sscanf(value, "%30i", &fval) == 1) { *tos = fval & 0xFF; return 0; } |