summaryrefslogtreecommitdiff
blob: b5d86dbbdd89646a082c719f5e0c9f29c9689c63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 lib/binsrch.c | 4 ++--
 src/wn.c      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/binsrch.c b/lib/binsrch.c
index 8b71216..9ac51a7 100644
--- a/lib/binsrch.c
+++ b/lib/binsrch.c
@@ -193,7 +193,7 @@ char *replace_line(char *new_line, char *searchkey, FILE *fp)
     copyfile(fp, tfp);
     if (fseek(fp, offset, 0) == -1)
 	return(NULL);		/* could not seek to offset */
-    fprintf(fp, new_line);	/* write line */
+    fprintf(fp, "%s", new_line);	/* write line */
     rewind(tfp);
     copyfile(tfp, fp);
 
@@ -220,7 +220,7 @@ char *insert_line(char *new_line, char *searchkey, FILE *fp)
     copyfile(fp, tfp);
     if (fseek(fp, offset, 0) == -1)
 	return(NULL);		/* could not seek to offset */
-    fprintf(fp, new_line);	/* write line */
+    fprintf(fp, "%s", new_line);	/* write line */
     rewind(tfp);
     copyfile(tfp, fp);
 
diff --git a/src/wn.c b/src/wn.c
index 004e1e6..398632f 100644
--- a/src/wn.c
+++ b/src/wn.c
@@ -284,7 +284,7 @@ static void printsearches(char *word, int dbase, unsigned long search)
 	    printf("\t");
 	    printf(searchstr[j].template,
 		   partchars[dbase], partchars[dbase]);
-	    printf(searchstr[j].helpstr);
+	    printf("%s", searchstr[j].helpstr);
 	    printf("\n");
 	}
 }
@@ -345,7 +345,7 @@ static int getoptidx(char *searchtype)
 
 static int error_message(char *msg)
 {
-    fprintf(stderr, msg);
+    fprintf(stderr, "%s", msg);
     return(0);
 }