diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2013-11-28 09:13:17 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-11-29 19:06:47 +0100 |
commit | 537e806f8c62b26c5d5fa912f383f4a7d558574d (patch) | |
tree | 0f66cc8931e185632fcc23e4690194c19888bd83 | |
parent | 2fa288d0599369012465056a06c6ea09ce2a1134 (diff) | |
download | dev86-537e806f8c62b26c5d5fa912f383f4a7d558574d.tar.gz |
Fix format string use
copt.c: In function ‘writeoutf’:
copt.c:806:2: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(fp, headstr);
...
-rw-r--r-- | ar/ar.c | 2 | ||||
-rw-r--r-- | copt/copt.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -2036,7 +2036,7 @@ error_with_file (string, mapelt) struct mapelt *mapelt; { fprintf (stderr, "%s: ", program_name); - fprintf (stderr, string); + fprintf (stderr, "%s", string); if (mapelt->info.offset != 0) fprintf (stderr, "%s(%s)", archive, mapelt->info.name); else diff --git a/copt/copt.c b/copt/copt.c index 9392380..fe49ad5 100644 --- a/copt/copt.c +++ b/copt/copt.c @@ -803,7 +803,7 @@ static void writeoutf(char *filename, char *headstr) exit(1); } if (headstr != NULL) { - fprintf(fp, headstr); + fprintf(fp, "%s", headstr); fprintf(fp, "\n"); } for (lp = infile; lp != NULL; lp = lp->next) |