aboutsummaryrefslogtreecommitdiffstats
path: root/main/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/frame.c')
-rw-r--r--main/frame.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/frame.c b/main/frame.c
index 940ff5c5c..f2ceabf16 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -992,16 +992,16 @@ int ast_codec_pref_string(struct ast_codec_pref *pref, char *buf, size_t size)
slen = strlen(formatname);
if (slen > total_len)
break;
- strncat(buf,formatname,total_len);
+ strncat(buf, formatname, total_len - 1); /* safe */
total_len -= slen;
}
if (total_len && x < 31 && ast_codec_pref_index(pref , x + 1)) {
- strncat(buf,"|",total_len);
+ strncat(buf, "|", total_len - 1); /* safe */
total_len--;
}
}
if (total_len) {
- strncat(buf,")",total_len);
+ strncat(buf, ")", total_len - 1); /* safe */
total_len--;
}