1
0

160-format-security.patch 903 B

1234567891011121314151617181920212223242526272829
  1. From: Ben Myers <bpm@sgi.com>
  2. Date: Fri, 1 Feb 2013 21:50:22 +0000 (-0600)
  3. Subject: xfsprogs: fix warning in libxcmd/input.c
  4. X-Git-Tag: v3.1.11~25
  5. X-Git-Url: http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs%2Fcmds%2Fxfsprogs.git;a=commitdiff_plain;h=50a3aa8977821ad072f3aa5b63645827f9b8ca1d
  6. xfsprogs: fix warning in libxcmd/input.c
  7. Fix an error when building with -Werror=format-security.
  8. input.c: In function 'fetchline':
  9. input.c:91:2: error: format not a string literal and no format arguments [-Werror=format-security]
  10. Signed-off-by: Ben Myers <bpm@sgi.com>
  11. Reported by: Arkadiusz Miśkiewicz <arekm@maven.pl>
  12. Reviewed-by: Mark Tinguely <tinguely@sgi.com>
  13. ---
  14. --- a/libxcmd/input.c
  15. +++ b/libxcmd/input.c
  16. @@ -88,7 +88,7 @@ fetchline(void)
  17. if (!line)
  18. return NULL;
  19. - printf(get_prompt());
  20. + printf("%s", get_prompt());
  21. fflush(stdout);
  22. if (!fgets(line, MAXREADLINESZ, stdin)) {
  23. free(line);