0004-Fix-format-error-blocking-compilation-with-hardening.patch 846 B

123456789101112131415161718192021222324252627
  1. From: Petter Reinholdtsen <pere@hungry.com>
  2. Date: Wed, 22 Oct 2014 13:25:21 +0200
  3. Subject: Fix format error blocking compilation with hardening
  4. Last-Update: 2014-10-22
  5. Forwarded: no
  6. Enabling hardening refuses to compile code with sprintf() calls
  7. with no formatting string. Adjust the code to work with hardening.
  8. ---
  9. ogg123/status.c | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. diff --git a/ogg123/status.c b/ogg123/status.c
  12. index 92b8ff1..ccec389 100644
  13. --- a/ogg123/status.c
  14. +++ b/ogg123/status.c
  15. @@ -148,7 +148,7 @@ int print_statistics_line (stat_format_t stats[])
  16. switch (stats->type) {
  17. case stat_noarg:
  18. - len += sprintf(str+len, stats->formatstr);
  19. + len += sprintf(str+len, "%s", stats->formatstr);
  20. break;
  21. case stat_intarg:
  22. len += sprintf(str+len, stats->formatstr, stats->arg.intarg);