Index: apps/app_substring.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_substring.c,v retrieving revision 1.8 diff -u -p -r1.8 app_substring.c --- apps/app_substring.c 22 Jun 2004 19:32:52 -0000 1.8 +++ apps/app_substring.c 13 Jul 2004 22:19:57 -0000 @@ -59,9 +59,10 @@ static int substring_exec(struct ast_cha char newexten[AST_MAX_EXTENSION] = ""; char *count1, *count2; char *first, *second, *stringp; + stringp=alloca(strlen(data)+1); ast_log(LOG_WARNING, "The use of Substring application is deprecated. Please use ${variable:a:b} instead\n"); - strncpy(stringp,data,strlen(data)+1); + strncpy(stringp,data,strlen(data)); if (strchr(stringp,'|')&&strchr(stringp,'=')) { int icount1,icount2; first=strsep(&stringp,"=");