[FFmpeg-devel] rtmpproto compile error

leon l.vanstuivenberg at chello.nl
Sun Nov 4 23:51:01 CET 2012


Hi all,

Somehow not triggered on the fate build machines, but with more or less 
latest revision i run into the following problem:

CC      libavformat/rtmpproto.o
libavformat/rtmpproto.c: In function ârtmp_openâ:
libavformat/rtmpproto.c:2188:9: error: implicit declaration of function 
âstrcat_is_forbidden_due_to_security_issues_use_av_strlcatâ 
[-Werror=implicit-function-declaration]
make: *** [libavformat/rtmpproto.o] Error 1

Although the actual function used is 'strncat' and not 'strcat', it 
turns out that this include:

/usr/gcc4/lib/gcc/i686-pc-linux-gnu/4.7.2/include-fixed/bits/string2.h:774:0:

uses 'strcat', and hence triggers this issue.. :

/* Append no more than N characters from SRC onto DEST.  */
#ifndef _HAVE_STRING_ARCH_strncat
# ifdef _USE_STRING_ARCH_strchr
#  define strncat(dest, src, n) \
   (__extension__ ({ char *__dest = (dest); 
        \
                     __builtin_constant_p (src) && __builtin_constant_p 
(n)    \
                     ? (strlen (src) < ((size_t) (n)) 
        \
                        ? strcat (__dest, src) 
        \
                        : (*((char *) __mempcpy (strchr (__dest, '\0'), 
        \
                                                 src, n)) = '\0', 
__dest))     \
                     : strncat (dest, src, n); }))
# else
#  define strncat(dest, src, n) \
   (__extension__ (__builtin_constant_p (src) && __builtin_constant_p 
(n)      \
                   ? (strlen (src) < ((size_t) (n)) 
        \
                      ? strcat (dest, src) 
        \
                      : strncat (dest, src, n)) 
        \
                   : strncat (dest, src, n)))
# endif
#endif



Any suggestions how to fix it?

best regards
leon


More information about the ffmpeg-devel mailing list