[vlc-devel] Re: vlc: svn commit r20330 (fkuehne)

Rémi Denis-Courmont rdenis at simphalempin.com
Mon May 28 13:37:45 CEST 2007




On Mon, 28 May 2007 13:13:49 +0200 (CEST), Subversion daemon
<svn at videolan.org> wrote:
> r20330 | fkuehne | 2007-05-28 13:13:48 +0200 (Mon, 28 May 2007) | 1 line
> Changed paths:
>    M /trunk/modules/demux/mp4/libmp4.c
> 
> * revert the rewrite of MP4_GETSTRINGZ in the previous commit, as strnlen
> is a GNU-extension and therefore unavailable on Mac OS X and other
> platforms. I think this way is easier than writing an own implementation
> for OSX, but feel free to tell me otherwise. (closes #1213)
>  > http://trac.videolan.org/vlc/changeset/20330

I suspect this revert is invalid. strlen() is undefined if the p_peek is
not
properly terminated, while strnlen() is. Laurent might confirm or not.
Really:

static inline size_t strnlen (const char *s, size_t maxlen)
{
    const char *z = memchr (s, 0, maxlen);
    return z ? (z - s) : maxlen;
}

-- 
Rémi Denis-Courmont
http://www.remlab.net/

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list