[FFmpeg-cvslog] rtmpproto: Use av_strlcat instead of strncat

Martin Storsjö git at videolan.org
Mon Nov 5 21:48:11 CET 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Nov  5 11:13:33 2012 +0200| [f0615557e03518b2fdc6d036ba29031a90646011] | committer: Michael Niedermayer

rtmpproto: Use av_strlcat instead of strncat

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

Fixes: [FFmpeg-devel] rtmpproto compile error
Similar patch: [FFmpeg-devel] [PATCH] call to strncat replaced with av_strlcat to avoid compile issue with systems implementing strncat via strcat.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f0615557e03518b2fdc6d036ba29031a90646011
---

 libavformat/rtmpproto.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1d00cbb..72462cf 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2185,7 +2185,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
         } else {
             rt->playpath[0] = 0;
         }
-        strncat(rt->playpath, fname, PLAYPATH_MAX_LENGTH - 5);
+        av_strlcat(rt->playpath, fname, PLAYPATH_MAX_LENGTH);
     }
 
     if (!rt->tcurl) {



More information about the ffmpeg-cvslog mailing list