[MPlayer-cvslog] r22207 - trunk/stream/freesdp/parser.c
rtogni
subversion at mplayerhq.hu
Sun Feb 11 19:00:55 CET 2007
Author: rtogni
Date: Sun Feb 11 19:00:55 2007
New Revision: 22207
Modified:
trunk/stream/freesdp/parser.c
Log:
More strncat() misuses.
Reported by Sascha Sommer
Modified: trunk/stream/freesdp/parser.c
==============================================================================
--- trunk/stream/freesdp/parser.c (original)
+++ trunk/stream/freesdp/parser.c Sun Feb 11 19:00:55 2007
@@ -479,9 +479,9 @@
{
/* 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 @@
{
/* 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 @@
{
/* 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;
More information about the MPlayer-cvslog
mailing list