[FFmpeg-devel] [PATCH] call to strncat replaced with av_strlcat to avoid compile issue with systems implementing strncat via strcat.

Michael Niedermayer michaelni at gmx.at
Mon Nov 5 21:44:41 CET 2012


On Mon, Nov 05, 2012 at 09:30:22PM +0100, Jean First wrote:
> On Mon Nov 05 2012 21:50:06 GMT+0100 (CET), Leon van Stuivenberg wrote:
> >---
> >  libavformat/rtmpproto.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
> >index 1d00cbb..e729ab2 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 - 5);
> >      }
> >      if (!rt->tcurl) {
> 
> this just came up on another list

> http://comments.gmane.org/gmane.comp.video.libav.devel/38181

applied this one, as the length argument is more correct

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121105/77caa1c6/attachment.asc>


More information about the ffmpeg-devel mailing list