aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2012-05-21 21:14:01 +0200
committerGregor Jasny <gjasny@googlemail.com>2012-05-21 21:16:25 +0200
commit46558ee65e9fc7ac6d9b733b524cf9098fd1d90e (patch)
treeefb88467d8e177033c41ddd01a54bfdddb14d3f5
parent5b4d846402d6398830a61858eca02def1648ad49 (diff)
libdvbv5: Fix build error with hardening build flags
On Debian and Ubuntu the following hardening flags are used: (see dpkg-buildflags --export=sh) export CFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" export CPPFLAGS="-D_FORTIFY_SOURCE=2" export CXXFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" export FFLAGS="-g -O2" export LDFLAGS="-Wl,-z,relro" Without this commit the following error occurs: dvb-fe.c:56:3: error: format not a string literal and no format arguments [-Werror=format-security] dvb-fe.c:61:3: error: format not a string literal and no format arguments [-Werror=format-security] Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
-rw-r--r--lib/libdvbv5/dvb-fe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c
index 9c28166d..ba7bdf01 100644
--- a/lib/libdvbv5/dvb-fe.c
+++ b/lib/libdvbv5/dvb-fe.c
@@ -53,12 +53,12 @@ void dvb_default_log(int level, const char *fmt, ...)
if(STDERR_FILENO == loglevels[level].fd)
out = stderr;
if(isatty(loglevels[level].fd))
- fprintf(out, loglevels[level].color);
+ fputs(loglevels[level].color, out);
fprintf(out, "%s ", loglevels[level].name);
vfprintf(out, fmt, ap);
fprintf(out, "\n");
if(isatty(loglevels[level].fd))
- fprintf(out, loglevels[LOG_COLOROFF].color);
+ fputs(loglevels[LOG_COLOROFF].color, out);
va_end(ap);
}

Privacy Policy