pkgsrc-wip/asterisk/patches/patch-af
Marc Recht bc729d14c7 Initial import of asterisk 0.4.0
from PR pkg/22585

Asterisk is a complete PBX in software. It runs on Linux and provides
all of the features you would expect from a PBX and more. Asterisk
does voice over IP in three protocols, and can interoperate with
almost all standards-based telephony equipment using relatively
inexpensive hardware.

Asterisk provides Voicemail services with Directory, Call Conferencing,
Interactive Voice Response, Call Queuing. It has support for
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
client and gateway). Check the Features section for a more complete
list.
2003-11-10 10:14:16 +00:00

24 lines
758 B
Text

$NetBSD: patch-af,v 1.1.1.1 2003/11/10 10:14:30 marc Exp $
--- work.i386/asterisk-0.4.0/pbx.c- 2003-08-24 09:48:10.000000000 +0900
+++ work.i386/asterisk-0.4.0/pbx.c 2003-08-24 09:49:53.000000000 +0900
@@ -863,7 +863,9 @@
length=(int)(finish-tmp);
wherearewe+=length+1;
- lval=strndup(tmp+2,length-2);
+ lval = malloc(length - 2 + 1);
+ strncpy(lval, tmp + 2, length - 2);
+ lval[length - 2] = '\0';
pbx_substitute_variables_helper(c,lval,&ltmp,count+1);
free(lval);
if (ltmp) {
@@ -903,7 +905,7 @@
/* No variables or expressions in e->data, so why scan it? */
if (!strstr(e->data,"${") && !strstr(e->data,"$[")) {
- return strndup(e->data,strlen(e->data)+1);
+ return strdup(e->data);
}
cp1=e->data;