aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 3af70d12b..c2ccfdc91 100755
--- a/channel.c
+++ b/channel.c
@@ -2143,7 +2143,7 @@ int ast_channel_masquerade(struct ast_channel *original, struct ast_channel *clo
void ast_change_name(struct ast_channel *chan, char *newname)
{
char tmp[256];
- strncpy(tmp, chan->name, 256);
+ strncpy(tmp, chan->name, sizeof(tmp) - 1);
strncpy(chan->name, newname, sizeof(chan->name) - 1);
manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", tmp, chan->name, chan->uniqueid);
}