[packages/mplayer] fix build with -Wformat-security

glen glen at pld-linux.org
Sat May 4 12:23:01 CEST 2013


commit bfac6bf7a4e5b4e99905fe28d1efa99c05d94fdc
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 4 13:21:44 2013 +0300

    fix build with -Wformat-security

 mplayer.spec                  |  2 ++
 vstream-format-security.patch | 14 ++++++++++++++
 2 files changed, 16 insertions(+)
---
diff --git a/mplayer.spec b/mplayer.spec
index 811e198..805f145 100644
--- a/mplayer.spec
+++ b/mplayer.spec
@@ -149,6 +149,7 @@ Patch17:	%{name}-gsm.patch
 Patch18:	%{name}-openjpeg.patch
 Patch19:	%{name}-shared.patch
 Patch20:	%{name}-vstream.patch
+Patch23:	vstream-format-security.patch
 
 # codecs, outputs, demuxers:
 Patch21:	%{name}-auto-expand.patch
@@ -401,6 +402,7 @@ cp -f etc/codecs.conf etc/codecs.win32.conf
 %patch18 -p1
 %{?with_shared:%patch19 -p1}
 %patch20 -p1
+%patch23 -p0
 
 # codecs, outputs, demuxers:
 %patch21 -p1
diff --git a/vstream-format-security.patch b/vstream-format-security.patch
new file mode 100644
index 0000000..7e9e2af
--- /dev/null
+++ b/vstream-format-security.patch
@@ -0,0 +1,14 @@
+http://devel.mplayer2.org/ticket/163
+http://devel.mplayer2.org/changeset/8cd71527ade21ea27ea24cdcc66dc71dca460f85/
+
+Index: stream/stream_vstream.c
+===================================================================
+--- stream/stream_vstream.c	(revision 1888e57af7e1ce51517ad9bdc2d201eaf84a98d2)
++++ stream/stream_vstream.c	(revision 8cd71527ade21ea27ea24cdcc66dc71dca460f85)
+@@ -57,5 +57,5 @@
+     vsnprintf(buf, 1024, format, va);
+     va_end(va);
+-    mp_msg(MSGT_STREAM, MSGL_ERR, buf);
++    mp_msg(MSGT_STREAM, MSGL_ERR, "%s", buf);
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mplayer.git/commitdiff/bfac6bf7a4e5b4e99905fe28d1efa99c05d94fdc



More information about the pld-cvs-commit mailing list