Code

patches/: Added Wformat-security.dpatch.
[pkg-pfstools.git] / debian / patches / Wformat-security.dpatch
diff --git a/debian/patches/Wformat-security.dpatch b/debian/patches/Wformat-security.dpatch
new file mode 100644 (file)
index 0000000..cf07a76
--- /dev/null
@@ -0,0 +1,15 @@
+Description: Fix certain issues identified by -Wformat-security.
+Author: Sebastian Harl <tokkee@debian.org>
+
+--- a/src/pfs/pfs.cpp
++++ b/src/pfs/pfs.cpp
+@@ -525,8 +525,7 @@ static void writeTags( const TagContaine
+   TagList::const_iterator it;
+   fprintf( out, "%d" PFSEOL, tags->getSize() );
+   for( it = tags->tagsBegin(); it != tags->tagsEnd(); it++ ) {
+-    fprintf( out, (const char*)(it->c_str()) );
+-    fprintf( out, PFSEOL );
++    fprintf( out, "%s" PFSEOL, (const char*)(it->c_str()) );
+   }
+ }