[Asterisk-Dev] [PATCH] chan_sip.c removing the last character of the caller's name in callerid
Christopher Heiser
cheeseman00 at hotmail.com
Thu Jul 17 10:27:12 MST 2003
Below is the fix...
--Chris
$ cvs diff -u channels/chan_sip.c
Index: channels/chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.131
diff -u -r1.131 chan_sip.c
--- channels/chan_sip.c 15 Jul 2003 05:05:19 -0000 1.131
+++ channels/chan_sip.c 17 Jul 2003 17:47:15 -0000
@@ -3516,8 +3516,8 @@
/* 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;
}
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
More information about the asterisk-dev
mailing list