File: 100-format_security_error.diff

package info (click to toggle)
netkit-telnet-ssl 0.17.41%2Breally0.17-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,800 kB
  • sloc: cpp: 6,952; ansic: 6,724; sh: 182; makefile: 68
file content (53 lines) | stat: -rw-r--r-- 1,448 bytes parent folder | download
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
49
50
51
52
53
Description: Format string is not a string literal.
 Hardened builds are failing due to "-Werror=format-security".
 Insertion of a trivial format string resolves the failure.
Author: Mats Erik Andersson <debian@gisladisker.se>
Forwarded: no
Last-Update: 2015-01-09

--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -975,17 +975,17 @@
 			case ENV_VAR:
 			    if (pointer[1] == TELQUAL_SEND)
 				goto def_case;
-			    netoprintf("\" VAR " + noquote);
+			    netoprintf("%s", "\" VAR " + noquote);
 			    noquote = 2;
 			    break;
 
 			case ENV_VALUE:
-			    netoprintf("\" VALUE " + noquote);
+			    netoprintf("%s", "\" VALUE " + noquote);
 			    noquote = 2;
 			    break;
 
 			case ENV_ESC:
-			    netoprintf("\" ESC " + noquote);
+			    netoprintf("%s", "\" ESC " + noquote);
 			    noquote = 2;
 			    break;
 
--- a/telnet/utilities.cc
+++ b/telnet/utilities.cc
@@ -654,17 +654,17 @@
 			case ENV_VAR:
 			    if (pointer[1] == TELQUAL_SEND)
 				goto def_case;
-			    fprintf(NetTrace, "\" VAR " + noquote);
+			    fprintf(NetTrace, "%s", "\" VAR " + noquote);
 			    noquote = 2;
 			    break;
 
 			case ENV_VALUE:
-			    fprintf(NetTrace, "\" VALUE " + noquote);
+			    fprintf(NetTrace, "%s", "\" VALUE " + noquote);
 			    noquote = 2;
 			    break;
 
 			case ENV_ESC:
-			    fprintf(NetTrace, "\" ESC " + noquote);
+			    fprintf(NetTrace, "%s", "\" ESC " + noquote);
 			    noquote = 2;
 			    break;