rtmpproto: Use av_strlcat instead of strncat
authorMartin Storsjö <martin@martin.st>
Mon, 5 Nov 2012 09:13:33 +0000 (11:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 5 Nov 2012 20:47:43 +0000 (21:47 +0100)
Signed-off-by: Michael Niedermayer <michaelni@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.

libavformat/rtmpproto.c

index 1d00cbb..72462cf 100644 (file)
@@ -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) {