From eacf95dc111004dbd3a4f0f4a610fc5b131501c2 Mon Sep 17 00:00:00 2001 From: rtogni Date: Sun, 11 Feb 2007 18:00:06 +0000 Subject: [PATCH] strncat() misuses, may have been exploitable. Reported by Sascha Sommer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22206 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/freesdp/parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stream/freesdp/parser.c b/stream/freesdp/parser.c index 16ca9e666a..dcb94d2be8 100644 --- a/stream/freesdp/parser.c +++ b/stream/freesdp/parser.c @@ -832,9 +832,9 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc) { /* ignore unknown attributes, but provide access to them */ *fsdp_buf[1] = '\0'; - strncat (fsdp_buf[1], fsdp_buf[0], MAXLONGFIELDLEN); - strncat (fsdp_buf[1], ":", MAXLONGFIELDLEN); - strncat (fsdp_buf[1], longfsdp_buf, MAXLONGFIELDLEN); + strncat (fsdp_buf[1], fsdp_buf[0], MAXSHORTFIELDLEN-1); + strncat (fsdp_buf[1], ":", MAXSHORTFIELDLEN-strlen(fsdp_buf[1])-1); + strncat (fsdp_buf[1], longfsdp_buf, MAXSHORTFIELDLEN-strlen(fsdp_buf[1])-1); if (NULL == media->unidentified_attributes) { media->unidentified_attributes_count = 0;