Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv10309
Modified Files:
utils.c
Log Message:
fix breakage when ast_copy_string is used to copy substrings (bug #4146, but a
different fix)
Index: utils.c
===================================================================
RCS file: /usr/cvsroot/asterisk/utils.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- utils.c 2 May 2005 00:27:54 -0000 1.40
+++ utils.c 3 May 2005 23:51:20 -0000 1.41
@@ -420,8 +420,10 @@
void ast_copy_string(char *dst, const char *src, size_t size)
{
- while (*src && size--)
+ while (*src && size) {
*dst++ = *src++;
+ size--;
+ }
if (__builtin_expect(!size, 0))
dst--;
*dst = '\0';
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs