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 /main/acl.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 'main/acl.c')
-rw-r--r-- | main/acl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/acl.c b/main/acl.c index 3484c71db..fea76a62b 100644 --- a/main/acl.c +++ b/main/acl.c @@ -297,7 +297,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); @@ -423,7 +423,7 @@ 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; return 0; @@ -438,7 +438,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; } |