0.5.2 (and HEAD) fails with insecure string literal in lt-messages.c

Issue #5 resolved
Hanspeter Niederstrasser created an issue

On OS X 10.7 with apple-clang-4.2, the build fails with this error.

/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../liblangtag/ -I.. -I../liblangtag/ -I.. -D__LANGTAG_COMPILATION -DBUILDDIR="\"/sw/build.build/liblangtag1-shlibs-0.5.2-1/liblangtag-0.5.2\"" -DSRCDIR="\"/sw/build.build/liblangtag1-shlibs-0.5.2-1/liblangtag-0.5.2\"" -DREGDATADIR="\"/sw/share/liblangtag\"" -DLANGTAG_EXT_MODULE_PATH="\"/sw/lib/liblangtag\"" -I/sw/include/libxml2 -I/sw/include -D_THREAD_SAFE -pthread  -I/sw/include -DG_LOG_DOMAIN="\"LangTag\""  -g -O2  -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs  -MT liblangtag_la-lt-messages.lo -MD -MP -MF .deps/liblangtag_la-lt-messages.Tpo -c -o liblangtag_la-lt-messages.lo `test -f 'lt-messages.c' || echo './'`lt-messages.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../liblangtag/ -I.. -I../liblangtag/ -I.. -D__LANGTAG_COMPILATION -DBUILDDIR=\"/sw/build.build/liblangtag1-shlibs-0.5.2-1/liblangtag-0.5.2\" -DSRCDIR=\"/sw/build.build/liblangtag1-shlibs-0.5.2-1/liblangtag-0.5.2\" -DREGDATADIR=\"/sw/share/liblangtag\" -DLANGTAG_EXT_MODULE_PATH=\"/sw/lib/liblangtag\" -I/sw/include/libxml2 -I/sw/include -D_THREAD_SAFE -pthread -I/sw/include -DG_LOG_DOMAIN=\"LangTag\" -g -O2 -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -MT liblangtag_la-lt-messages.lo -MD -MP -MF .deps/liblangtag_la-lt-messages.Tpo -c lt-messages.c  -fno-common -DPIC -o .libs/liblangtag_la-lt-messages.o
lt-messages.c:252:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
        vsnprintf(buffer, 4096, format, args);
                                ^~~~~~
/usr/include/secure/_stdio.h:72:63: note: expanded from macro 'vsnprintf'
  __builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap)
                                                              ^
1 error generated.
make[4]: *** [liblangtag_la-lt-messages.lo] Error 1

0.5.1 builds fine using the exact same build settings.

Comments (2)

  1. Log in to comment