aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directed_pickup.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_directed_pickup.c')
-rw-r--r--apps/app_directed_pickup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index 5ad2e3006..cb8505b56 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