Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv20544/channels
Modified Files:
iax2-parser.c
Log Message:
strncpy to ast_copy_string
Index: iax2-parser.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/iax2-parser.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- iax2-parser.c 26 Oct 2005 13:03:17 -0000 1.54
+++ iax2-parser.c 27 Oct 2005 02:42:05 -0000 1.55
@@ -77,7 +77,7 @@
maxlen--;
if (maxlen > len)
maxlen = len;
- strncpy(output,value, maxlen);
+ ast_copy_string(output, value, maxlen);
output[maxlen] = '\0';
}
@@ -92,7 +92,7 @@
if (maxlen > len)
maxlen = len;
- strncpy(output,value, maxlen);
+ ast_copy_string(output, value, maxlen);
output[maxlen] = '\0';
ast_codec_pref_convert(&pref, output, total_len, 0);
@@ -312,7 +312,7 @@
if (prov_ies[x].dump) {
prov_ies[x].dump(interp,
(int)sizeof(interp), iedata + 2, ielen);
snprintf(tmp, (int)sizeof(tmp), "
%-15.15s : %s\n", prov_ies[x].name, interp);
- strncpy(output, tmp, maxlen - 1);
+ ast_copy_string(output, tmp, maxlen);
maxlen -= strlen(output); output +=
strlen(output);
} else {
if (ielen)
@@ -320,7 +320,7 @@
else
strcpy(interp, "Present");
snprintf(tmp, (int)sizeof(tmp), "
%-15.15s : %s\n", prov_ies[x].name, interp);
- strncpy(output, tmp, maxlen - 1);
+ ast_copy_string(output, tmp, maxlen);
maxlen -= strlen(output); output +=
strlen(output);
}
found++;
@@ -328,7 +328,7 @@
}
if (!found) {
snprintf(tmp, (int)sizeof(tmp), " Unknown Prov IE
%03d : Present\n", ie);
- strncpy(output, tmp, maxlen - 1);
+ ast_copy_string(output, tmp, maxlen);
maxlen -= strlen(output); output += strlen(output);
}
iedata += (2 + ielen);
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs