From: David Vossel Date: Mon, 10 May 2010 19:06:08 +0000 (+0000) Subject: fixes PickupChan application X-Git-Tag: 11.0.0-beta1~3054 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62067caaabd7334c7134832f92785b9d7bf706cf;p=thirdparty%2Fasterisk.git fixes PickupChan application (closes issue #16863) Reported by: schern Patches: app_directed_pickup.c.patch uploaded by schern (license 995) for_trunk.diff uploaded by cjacobsen (license 1029) Tested by: Graber, cjacobsen, lathama, rickead2000, dvossel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262240 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c index 5ad2e3006f..cb8505b56e 100644 --- a/apps/app_directed_pickup.c +++ b/apps/app_directed_pickup.c @@ -179,9 +179,9 @@ static struct ast_channel *my_ast_get_channel_by_name_locked(const char *channam char *chkchan; struct pickup_by_name_args pickup_args; - pickup_args.len = strlen(channame) + 2; + pickup_args.len = strlen(channame) + 1; - chkchan = alloca(pickup_args.len); + chkchan = alloca(pickup_args.len + 1); /* need to append a '-' for the comparison so we check full channel name, * i.e SIP/hgc- , use a temporary variable so original stays the same for