0001-shell.c-Fix-format-not-a-string-literal-warning.patch 925 B

1234567891011121314151617181920212223242526272829303132
  1. From 443980ddc82fb40e2e1f9544f2be169bd23dd246 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Sat, 17 Jun 2017 16:49:24 -0700
  4. Subject: [PATCH] shell.c: Fix format not a string literal warning
  5. src/shell.c:695:20: error: format not a string literal and no format arguments [-Werror=format-security]
  6. | fprintf(stderr,zHelp);
  7. | ^~~~~
  8. Upstream-Status: Pending
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. src/shell.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. diff --git a/src/shell.c b/src/shell.c
  14. index bb46c49..3c6fe0f 100644
  15. --- a/src/shell.c
  16. +++ b/src/shell.c
  17. @@ -692,7 +692,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
  18. }else
  19. if( c=='h' && strncmp(azArg[0], "help", n)==0 ){
  20. - fprintf(stderr,zHelp);
  21. + fprintf(stderr, "%s", zHelp);
  22. }else
  23. if( c=='i' && strncmp(azArg[0], "indices", n)==0 && nArg>1 ){
  24. --
  25. 2.13.1