[FFmpeg-devel] [PATCH] Store Major brand, Minor version and compatible brands of a mov file using the metadata API

Michael Niedermayer michaelni
Wed Sep 9 22:07:52 CEST 2009

On Wed, Sep 09, 2009 at 12:18:20PM +0200, Reimar D?ffinger wrote:
> On Wed, Sep 09, 2009 at 12:44:00AM -0700, Baptiste Coudurier wrote:
> > On 09/09/2009 12:03 AM, haim alon wrote:
> > > Since we are dealing with string (4 characters) I think using the strlcpy is
> > > more suitable.
> > > This also inserts the NULL terminator at the end of the destination string.
> > 
> > We are dealing with uint32_t here, and you are reading one byte too much.
> No, at least av_strlcpy reads at most "size-1" bytes, 4 in this case.
> The problem is with the return value of it:
> return len + strlen(src) - 1;
> So my suggestion to replace strncpy with av_strlcpy actually completely
> broke things, (av_)strlcpy can only be used for correctly 0-terminated
> strings, and I fear that this is used wrongly in some places in
> FFmpeg, e.g. rtmppkt.c looks suspicious.

please doxument that issue in the av_strlcpy() doxy


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090909/73b2d6be/attachment.pgp>

More information about the ffmpeg-devel mailing list