From d918aadd7647fa527f14e6d30cd7752efd178e0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Tue, 13 Nov 2012 14:40:42 +0100 Subject: [PATCH] - fix -Wformat-security errors --- format-security.patch | 22 ++++++++++++++++++++++ mp4v2.spec | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 format-security.patch diff --git a/format-security.patch b/format-security.patch new file mode 100644 index 0000000..68cd656 --- /dev/null +++ b/format-security.patch @@ -0,0 +1,22 @@ +--- mp4v2-1.9.1/src/mp4file.cpp~ 2009-07-14 01:07:12.000000000 +0200 ++++ mp4v2-1.9.1/src/mp4file.cpp 2012-11-13 14:19:21.505940224 +0100 +@@ -2580,7 +2580,7 @@ + GetChapters(&chapters, &chapterCount, sourceType); + if (0 == chapterCount) + { +- VERBOSE_READ(GetVerbosity(), printf(errMsg)); ++ VERBOSE_READ(GetVerbosity(), printf("%s", errMsg)); + return MP4ChapterTypeNone; + } + +--- mp4v2-1.9.1/src/mp4property.cpp~ 2009-07-14 01:07:11.000000000 +0200 ++++ mp4v2-1.9.1/src/mp4property.cpp 2012-11-13 14:20:00.485938846 +0100 +@@ -619,7 +619,7 @@ + + oss << " |" << text.str() << "|\n"; + +- fprintf( pFile, oss.str().c_str() ); ++ fprintf( pFile, "%s", oss.str().c_str() ); + fflush( pFile ); + return; + } diff --git a/mp4v2.spec b/mp4v2.spec index d554502..cba0630 100644 --- a/mp4v2.spec +++ b/mp4v2.spec @@ -8,6 +8,7 @@ License: MPL v1.1 Group: Applications/Multimedia Source0: http://mp4v2.googlecode.com/files/%{name}-%{version}.tar.bz2 # Source0-md5: 986701929ef15b03155ac4fb16444797 +Patch0: format-security.patch URL: http://code.google.com/p/mp4v2/ BuildRequires: libstdc++-devel Requires: %{name}-libs = %{version}-%{release} @@ -48,6 +49,7 @@ This package contains static version of MP4v2. %prep %setup -q +%patch0 -p1 %build %configure -- 2.44.0