aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_indications.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-14 13:57:15 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-14 13:57:15 +0000
commit5d8654361451b217b1fc604f449554e74a11b70b (patch)
tree30a1118273807f5c6ba0e3ca611ab0c6a160fa3b /res/res_indications.c
parent3aea726c3943cf31d2d90c194d1e126891b1481d (diff)
Merge remaining audit patch (save dlfcn.c)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3436 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_indications.c')
-rwxr-xr-xres/res_indications.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_indications.c b/res/res_indications.c
index f3bbc01ba..b289612d5 100755
--- a/res/res_indications.c
+++ b/res/res_indications.c
@@ -163,7 +163,7 @@ static int handle_show_indications(int fd, int argc, char *argv[])
j += snprintf(buf+j,sizeof(buf)-j,"%d,",tz->ringcadance[i]);
}
if (tz->nrringcadance) j--;
- strncpy(buf+j,"\n",sizeof(buf)-j);
+ strncpy(buf+j,"\n",sizeof(buf)-j-1);
ast_cli(fd,buf);
for (ts=tz->tones; ts; ts=ts->next)
ast_cli(fd,"%-7.7s %-15.15s %s\n",tz->country,ts->name,ts->data);
@@ -241,7 +241,7 @@ static int ind_load_module(void)
return -1;
}
memset(tones,0,sizeof(struct tone_zone));
- strncpy(tones->country,cxt,sizeof(tones->country));
+ strncpy(tones->country,cxt,sizeof(tones->country) - 1);
v = ast_variable_browse(cfg, cxt);
while(v) {
@@ -282,7 +282,7 @@ static int ind_load_module(void)
return -1;
}
memset(azone,0,sizeof(struct tone_zone));
- strncpy(azone->country,country,sizeof(azone->country));
+ strncpy(azone->country, country, sizeof(azone->country) - 1);
strncpy(azone->alias, cxt, sizeof(azone->alias)-1);
if (ast_register_indication_country(azone)) {
ast_log(LOG_WARNING, "Unable to register indication alias at line %d.\n",v->lineno);