aboutsummaryrefslogtreecommitdiffstats
path: root/channels/iax2-provision.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:15:57 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:15:57 +0000
commit8cae492343324ae845b8b19d78b253d824eac10f (patch)
tree3d0ab9b89a652c8bde68776be0e8b945b81aaa6b /channels/iax2-provision.c
parent9f4c1d7a4e1ee5f0ea1b21af53eb7357366ff661 (diff)
AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@211528 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/iax2-provision.c')
-rw-r--r--channels/iax2-provision.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/iax2-provision.c b/channels/iax2-provision.c
index b6137a88b..b980cfea0 100644
--- a/channels/iax2-provision.c
+++ b/channels/iax2-provision.c
@@ -246,7 +246,7 @@ int iax_provision_version(unsigned int *version, const char *template, int force
ast_mutex_lock(&provlock);
ast_db_get("iax/provisioning/cache", template, tmp, sizeof(tmp));
- if (sscanf(tmp, "v%x", version) != 1) {
+ if (sscanf(tmp, "v%30x", version) != 1) {
if (strcmp(tmp, "u")) {
ret = iax_provision_build(&ied, version, template, force);
if (ret)
@@ -305,7 +305,7 @@ static int iax_template_parse(struct iax_template *cur, struct ast_config *cfg,
v = ast_variable_browse(cfg, s);
while(v) {
if (!strcasecmp(v->name, "port") || !strcasecmp(v->name, "serverport")) {
- if ((sscanf(v->value, "%d", &x) == 1) && (x > 0) && (x < 65535)) {
+ if ((sscanf(v->value, "%5d", &x) == 1) && (x > 0) && (x < 65535)) {
if (!strcasecmp(v->name, "port")) {
cur->port = x;
foundportno = 1;