diff options
Diffstat (limited to 'apps/app_softhangup.c')
-rw-r--r-- | apps/app_softhangup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_softhangup.c b/apps/app_softhangup.c index 46584c3e7..018edc07d 100644 --- a/apps/app_softhangup.c +++ b/apps/app_softhangup.c @@ -74,7 +74,7 @@ static int softhangup_exec(struct ast_channel *chan, void *data) all = options && strchr(options,'a'); c = ast_channel_walk_locked(NULL); while (c) { - strncpy(name, c->name, sizeof(name)-1); + ast_copy_string(name, c->name, sizeof(name)); ast_mutex_unlock(&c->lock); /* XXX watch out, i think it is wrong to access c-> after unlocking! */ if (all) { |