diff options
author | rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-11 18:00:06 +0000 |
---|---|---|
committer | rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-11 18:00:06 +0000 |
commit | eacf95dc111004dbd3a4f0f4a610fc5b131501c2 (patch) | |
tree | d0913baba2999e7864061d0aeed4639a5c64fbee /stream/freesdp/parser.c | |
parent | 656c22ca16c28fcd3a0498cef3078fb8cb351578 (diff) | |
download | mpv-eacf95dc111004dbd3a4f0f4a610fc5b131501c2.tar.bz2 mpv-eacf95dc111004dbd3a4f0f4a610fc5b131501c2.tar.xz |
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
Diffstat (limited to 'stream/freesdp/parser.c')
-rw-r--r-- | stream/freesdp/parser.c | 6 |
1 files 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; |