aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xchannels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 563620478..3699ded2e 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3516,8 +3516,8 @@ static char *get_calleridname(char *input,char *output)
/* clear the empty characters in the end */
while(*end && (*end < 33) && end > input)
end--;
- if (end > input)
- strncpy(output,input,(int)(end-input));
+ if (end >= input)
+ strncpy(output,input,(int)(end-input)+1);
else
output = NULL;
}