File: 01_fix_string_format.diff

package info (click to toggle)
shush 1.2.3-5.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 820 kB
  • sloc: ansic: 5,515; sh: 2,706; lex: 69; makefile: 69; yacc: 54; awk: 31
file content (26 lines) | stat: -rw-r--r-- 860 bytes parent folder | download | duplicates (3)
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
# Description: Fix format string errors, resolving FTBFS
# Author: Daniel T Chen <seven.steps@gmail.com>
# Bug-Debian: http://bugs.debian.org/734510
# Last-Update: 2014-07-04
Index: shush/src/analyzer.c
===================================================================
--- shush.orig/src/analyzer.c
+++ shush/src/analyzer.c
@@ -654,7 +654,7 @@ output_file(FILE *mail, char *name, int
 	    else
 		tag = (format == CF_FORMAT_RICH) ? "</Bold>" : "</b>";
 
-	    if (fprintf(mail, tag) != strlen(tag))
+		if (fprintf(mail, "%s", tag) != strlen(tag))
 	      {
 		error("fprintf() failed: %s", ERRSTR);
 		return -1;
@@ -675,7 +675,7 @@ output_file(FILE *mail, char *name, int
 	    else
 		abort();
 
-	    if (fprintf(mail, esc) != strlen(esc))
+		if (fprintf(mail, "%s", esc) != strlen(esc))
 	      {
 		error("fprintf() failed: %s", ERRSTR);
 		return -1;