~ubuntu-branches/ubuntu/wily/netkit-telnet-ssl/wily-proposed

« back to all changes in this revision

Viewing changes to debian/patches/100-format_security_error.diff

  • Committer: Package Import Robot
  • Author(s): Mats Erik Andersson
  • Date: 2015-04-27 23:20:22 UTC
  • mfrom: (7.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150427232022-c2f04nl1gr4qyqom
Tags: 0.17.40+0.2-1
* Bring in package changes from experimental to unstable.
* Update to source version 0.17-40 of netkit-telnet.
  + debian/rules: Define and use the variable LDDEFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Format string is not a string literal.
 
2
 Hardened builds are failing due to "-Werror=format-security".
 
3
 Insertion of a trivial format string resolves the failure.
 
4
Author: Mats Erik Andersson <debian@gisladisker.se>
 
5
Forwarded: no
 
6
Last-Update: 2015-01-09
 
7
 
 
8
--- netkit-telnet-0.17/telnetd/utility.c.orig   2015-01-09 20:22:23.000000000 +0100
 
9
+++ netkit-telnet-0.17/telnetd/utility.c        2015-01-09 23:11:41.695499612 +0100
 
10
@@ -890,17 +890,17 @@
 
11
                        case ENV_VAR:
 
12
                            if (pointer[1] == TELQUAL_SEND)
 
13
                                goto def_case;
 
14
-                           netoprintf("\" VAR " + noquote);
 
15
+                           netoprintf("%s", "\" VAR " + noquote);
 
16
                            noquote = 2;
 
17
                            break;
 
18
 
 
19
                        case ENV_VALUE:
 
20
-                           netoprintf("\" VALUE " + noquote);
 
21
+                           netoprintf("%s", "\" VALUE " + noquote);
 
22
                            noquote = 2;
 
23
                            break;
 
24
 
 
25
                        case ENV_ESC:
 
26
-                           netoprintf("\" ESC " + noquote);
 
27
+                           netoprintf("%s", "\" ESC " + noquote);
 
28
                            noquote = 2;
 
29
                            break;
 
30
 
 
31
--- netkit-telnet-0.17/telnet/utilities.cc.orig 2015-01-09 20:22:23.000000000 +0100
 
32
+++ netkit-telnet-0.17/telnet/utilities.cc      2015-01-09 23:33:05.219513739 +0100
 
33
@@ -583,17 +583,17 @@
 
34
                        case ENV_VAR:
 
35
                            if (pointer[1] == TELQUAL_SEND)
 
36
                                goto def_case;
 
37
-                           fprintf(NetTrace, "\" VAR " + noquote);
 
38
+                           fprintf(NetTrace, "%s", "\" VAR " + noquote);
 
39
                            noquote = 2;
 
40
                            break;
 
41
 
 
42
                        case ENV_VALUE:
 
43
-                           fprintf(NetTrace, "\" VALUE " + noquote);
 
44
+                           fprintf(NetTrace, "%s", "\" VALUE " + noquote);
 
45
                            noquote = 2;
 
46
                            break;
 
47
 
 
48
                        case ENV_ESC:
 
49
-                           fprintf(NetTrace, "\" ESC " + noquote);
 
50
+                           fprintf(NetTrace, "%s", "\" ESC " + noquote);
 
51
                            noquote = 2;
 
52
                            break;
 
53