format-security-errors.patch 963 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- a/fscklog/display.c
  2. +++ b/fscklog/display.c
  3. @@ -182,7 +182,7 @@ void dump_service_log()
  4. } else {
  5. /* the record looks ok */
  6. msg_txt = &log_entry[log_entry_pos];
  7. - printf(msg_txt);
  8. + printf("%s", msg_txt);
  9. /*
  10. * set up for the next record
  11. */
  12. --- a/fscklog/fscklog.c
  13. +++ b/fscklog/fscklog.c
  14. @@ -252,8 +252,8 @@ int v_send_msg(int msg_num, const char *file_name, int line_number, ...) {
  15. sprintf(debug_detail, " [%s:%d]\n", basename(file_name), line_number);
  16. - printf(msg_string);
  17. - printf(debug_detail);
  18. + printf("%s", msg_string);
  19. + printf("%s", debug_detail);
  20. return 0;
  21. }
  22. --- a/logdump/helpers.c
  23. +++ b/logdump/helpers.c
  24. @@ -95,8 +95,8 @@ int v_fsck_send_msg(int msg_num, const char *file_name, int line_number, ...) {
  25. sprintf(debug_detail, " [%s:%d]\n", file_name, line_number);
  26. - printf(msg_string);
  27. - printf(debug_detail);
  28. + printf("%s", msg_string);
  29. + printf("%s", debug_detail);
  30. return 0;
  31. }