summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-11 18:00:55 +0000
committerrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-11 18:00:55 +0000
commitacb11de6b9429226e9ccb4a344914cbd0f322548 (patch)
treebe26ba3d46a4266347d4cc4c95ba58933bc5dd66 /stream
parenteacf95dc111004dbd3a4f0f4a610fc5b131501c2 (diff)
downloadmpv-acb11de6b9429226e9ccb4a344914cbd0f322548.tar.bz2
mpv-acb11de6b9429226e9ccb4a344914cbd0f322548.tar.xz
More strncat() misuses.
Reported by Sascha Sommer git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22207 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/freesdp/parser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/stream/freesdp/parser.c b/stream/freesdp/parser.c
index dcb94d2be8..394c80f9e0 100644
--- a/stream/freesdp/parser.c
+++ b/stream/freesdp/parser.c
@@ -479,9 +479,9 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc)
{
/* ignore unknown attributes, but provide access to them */
*longfsdp_buf = '\0';
- strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN);
- strncat (longfsdp_buf, ":", MAXLONGFIELDLEN);
- strncat (longfsdp_buf, fsdp_buf[1], MAXLONGFIELDLEN);
+ strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN-1);
+ strncat (longfsdp_buf, ":", MAXLONGFIELDLEN-strlen(longfsdp_buf)-1);
+ strncat (longfsdp_buf, fsdp_buf[1], MAXLONGFIELDLEN-strlen(longfsdp_buf)-1);
if (NULL == dsc->unidentified_attributes)
{
dsc->unidentified_attributes_count = 0;
@@ -515,7 +515,7 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc)
{
/* ignore unknown attributes, but provide access to them */
*longfsdp_buf = '\0';
- strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN);
+ strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN-1);
if (NULL == dsc->unidentified_attributes)
{
dsc->unidentified_attributes_count = 0;
@@ -868,7 +868,7 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc)
{
/* ignore unknown attributes, but provide access to them */
*longfsdp_buf = '\0';
- strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN);
+ strncat (longfsdp_buf, fsdp_buf[0], MAXLONGFIELDLEN-1);
if (NULL == media->unidentified_attributes)
{
media->unidentified_attributes_count = 0;