1
0
Fork 0

Using string literal to fix FTBFS with -Werror=format-security.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-21 11:11:37 +01:00
parent 4110fa9a20
commit c0c732650b
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,24 @@
Author: Daniel Baumann <mail@daniel-baumann.ch>
Description: Using string literal to fix FTBFS with -Werror=format-security.
diff -Naurp lziprecover.orig/main.cc lziprecover/main.cc
--- lziprecover.orig/main.cc
+++ lziprecover/main.cc
@@ -418,7 +418,7 @@ int decompress( const int infd, const Pr
}
retval = 2; break;
}
- if( verbosity >= 2 ) { std::fprintf( stderr, ok_msg ); pp.reset(); }
+ if( verbosity >= 2 ) { std::fprintf( stderr, "%s", ok_msg ); pp.reset(); }
}
}
catch( std::bad_alloc )
@@ -427,7 +427,7 @@ int decompress( const int infd, const Pr
retval = 1;
}
catch( Error e ) { pp(); show_error( e.msg, errno ); retval = 1; }
- if( verbosity == 1 && retval == 0 ) std::fprintf( stderr, ok_msg );
+ if( verbosity == 1 && retval == 0 ) std::fprintf( stderr, "%s", ok_msg );
return retval;
}

View file

@ -1 +1,2 @@
0001-build.patch
0002-format-security.patch