Index: res/res_adsi.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_adsi.c,v retrieving revision 1.8 diff -u -p -r1.8 res_adsi.c --- res/res_adsi.c 29 Jun 2004 04:42:19 -0000 1.8 +++ res/res_adsi.c 14 Jul 2004 07:53:09 -0000 @@ -1006,13 +1006,11 @@ static void init_state(void) for (x=0;xname, "greeting")) { if (x < ADSI_MAX_INTRO) { aligns[x] = alignment; - strncpy(intro[x], v->value, 20); + strncpy(intro[x], v->value, sizeof(intro[x]) - 1); + intro[x][sizeof(intro[x]) - 1] = '\0'; x++; } } else if (!strcasecmp(v->name, "maxretries")) { @@ -1056,7 +1055,7 @@ static void adsi_load(void) sname = name; if (x < ADSI_MAX_SPEED_DIAL) { /* Up to 20 digits */ - strncpy(speeddial[x][0], v->name, 20); + strncpy(speeddial[x][0], v->name, sizeof(speeddial[x][0]) - 1); strncpy(speeddial[x][1], name, 18); strncpy(speeddial[x][2], sname, 7); x++;