Blame SOURCES/wordnet-3.0-Pass-compilation-with-Werror-format-security.patch

f3e103
From ab6d29e9056173145cf49ebf9804e6caf2f870ea Mon Sep 17 00:00:00 2001
f3e103
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
f3e103
Date: Wed, 4 Dec 2013 15:58:30 +0100
f3e103
Subject: [PATCH] Pass compilation with -Werror=format-security
f3e103
MIME-Version: 1.0
f3e103
Content-Type: text/plain; charset=UTF-8
f3e103
Content-Transfer-Encoding: 8bit
f3e103
f3e103
<https://bugzilla.redhat.com/show_bug.cgi?id=1037386>
f3e103
f3e103
Signed-off-by: Petr Písař <ppisar@redhat.com>
f3e103
---
f3e103
 lib/binsrch.c | 4 ++--
f3e103
 src/wn.c      | 3 +--
f3e103
 2 files changed, 3 insertions(+), 4 deletions(-)
f3e103
f3e103
diff --git a/lib/binsrch.c b/lib/binsrch.c
f3e103
index 8b71216..6b17325 100644
f3e103
--- a/lib/binsrch.c
f3e103
+++ b/lib/binsrch.c
f3e103
@@ -193,7 +193,7 @@ char *replace_line(char *new_line, char *searchkey, FILE *fp)
f3e103
     copyfile(fp, tfp);
f3e103
     if (fseek(fp, offset, 0) == -1)
f3e103
 	return(NULL);		/* could not seek to offset */
f3e103
-    fprintf(fp, new_line);	/* write line */
f3e103
+    fputs(new_line, fp);	/* write line */
f3e103
     rewind(tfp);
f3e103
     copyfile(tfp, fp);
f3e103
 
f3e103
@@ -220,7 +220,7 @@ char *insert_line(char *new_line, char *searchkey, FILE *fp)
f3e103
     copyfile(fp, tfp);
f3e103
     if (fseek(fp, offset, 0) == -1)
f3e103
 	return(NULL);		/* could not seek to offset */
f3e103
-    fprintf(fp, new_line);	/* write line */
f3e103
+    fputs(new_line, fp);	/* write line */
f3e103
     rewind(tfp);
f3e103
     copyfile(tfp, fp);
f3e103
 
f3e103
diff --git a/src/wn.c b/src/wn.c
f3e103
index 6870a60..7eef283 100644
f3e103
--- a/src/wn.c
f3e103
+++ b/src/wn.c
f3e103
@@ -284,8 +284,7 @@ static void printsearches(char *word, int dbase, unsigned long search)
f3e103
 	    printf("\t");
f3e103
 	    printf(searchstr[j].template,
f3e103
 		   partchars[dbase], partchars[dbase]);
f3e103
-	    printf(searchstr[j].helpstr);
f3e103
-	    printf("\n");
f3e103
+	    printf("%s\n", searchstr[j].helpstr);
f3e103
 	}
f3e103
 }
f3e103
 
f3e103
-- 
f3e103
1.8.3.1
f3e103