build: fix FTBFS with format-hardening

~~~~
x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include -I/usr/include -D__STDC_CONSTANT_MACROS -Wall -finline-functions -fomit-frame-pointer -I/usr/include -D__STDC_CONSTANT_MACROS -D_FORTIFY_SOURCE=2 -D__STDC_CONSTANT_MACROS -D__STDC_CONSTANT_MACROS -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -DZM_FFMPEG_CVS -DHAVE_LIBCRYPTO -MT zm_mpeg.o -MD -MP -MF .deps/zm_mpeg.Tpo -c -o zm_mpeg.o zm_mpeg.cpp
zm_mpeg.cpp: In member function ‘void VideoStream::SetupFormat()’:
zm_mpeg.cpp:112:56: error: format not a string literal and no format arguments [-Werror=format-security]
snprintf( s->filename, sizeof(s->filename), filename );
                                                     ^
zm_mpeg.cpp:112:56: error: format not a string literal and no format arguments [-Werror=format-security]
~~~~

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
pull/761/head
Dmitry Smirnov 2015-03-30 15:26:59 +11:00
parent 6aed8e5475
commit 6bbe42c5eb
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ void VideoStream::SetupFormat( )
if(filename)
{
snprintf( s->filename, sizeof(s->filename), filename );
snprintf( s->filename, sizeof(s->filename), "%s", filename );
}
ofc = s;