Package: hylafax / 3:6.0.6-5

810_hardening.patch Patch series | 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
Description: harden hylafax source an build procedure
 Applied from Debian bug #656260
Author: Giuseppe Sacco <eppesuig@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/656260
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: no
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2012-03-15

Index: hylafax-6.1~20111227/defs.in
===================================================================
--- hylafax-6.1~20111227.orig/defs.in	2012-03-15 21:23:09.009195977 +0100
+++ hylafax-6.1~20111227/defs.in	2012-03-15 21:23:47.229197431 +0100
@@ -262,7 +262,8 @@
 #     then its make file should override the setting of SHDLIBC with a
 #     line such as "SHDLIBC=".
 #
-LDFLAGS		= ${LDOPTS} ${LDLIBS}
+LDFLAGS_ENV	:= $(shell dpkg-buildflags --get LDFLAGS)
+LDFLAGS		= ${LDFLAGS_ENV} ${LDOPTS} ${LDLIBS}
 
 LDOPTS		= ${VLDOPTS} ${LLDOPTS} ${GLDOPTS}
 LDLIBS		= ${VLDLIBS} ${LLDLIBS} ${GLDLIBS}
Index: hylafax-6.1~20111227/libhylafax/FaxClient.c++
===================================================================
--- hylafax-6.1~20111227.orig/libhylafax/FaxClient.c++	2012-03-15 21:23:09.009195977 +0100
+++ hylafax-6.1~20111227/libhylafax/FaxClient.c++	2012-03-15 21:23:47.233197432 +0100
@@ -116,7 +116,7 @@
 void
 FaxClient::vprintWarning(const char* fmt, va_list ap)
 {
-    fprintf(stderr, NLS::TEXT("Warning, "));
+    fprintf(stderr, "%s", NLS::TEXT("Warning, "));
     vfprintf(stderr, fmt, ap);
     fputs("\n", stderr);
 }
Index: hylafax-6.1~20111227/libhylafax/SNPPClient.c++
===================================================================
--- hylafax-6.1~20111227.orig/libhylafax/SNPPClient.c++	2012-03-15 21:23:09.009195977 +0100
+++ hylafax-6.1~20111227/libhylafax/SNPPClient.c++	2012-03-15 21:23:47.233197432 +0100
@@ -103,7 +103,7 @@
 void
 SNPPClient::vprintWarning(const char* fmt, va_list ap)
 {
-    fprintf(stderr, NLS::TEXT("Warning, "));
+    fprintf(stderr, "%s", NLS::TEXT("Warning, "));
     vfprintf(stderr, fmt, ap);
     fputs("\n", stderr);
 }
Index: hylafax-6.1~20111227/libhylafax/TextFormat.c++
===================================================================
--- hylafax-6.1~20111227.orig/libhylafax/TextFormat.c++	2012-03-15 21:23:09.009195977 +0100
+++ hylafax-6.1~20111227/libhylafax/TextFormat.c++	2012-03-15 21:23:47.233197432 +0100
@@ -1371,7 +1371,7 @@
 {
     fxStr emsg;
     if (!decodeFontName(family, fontpath, emsg)) {
-	fprintf(stderr,emsg);
+	fprintf(stderr,"%s", (const char*)emsg);
 	return NULL;
     }
     return Sys::fopen(fontpath, "r");
Index: hylafax-6.1~20111227/libhylafax/TypeRules.c++
===================================================================
--- hylafax-6.1~20111227.orig/libhylafax/TypeRules.c++	2012-03-15 21:23:09.009195977 +0100
+++ hylafax-6.1~20111227/libhylafax/TypeRules.c++	2012-03-15 21:23:47.233197432 +0100
@@ -101,7 +101,7 @@
 	    printf(" \"%s\"", value.s);
 	else if (type != ASCII && type != ASCIIESC) {
 	    if (op == ANY)
-		printf(NLS::TEXT(" <any value>"));
+		printf("%s", NLS::TEXT(" <any value>"));
 	    else
 		printf(" %#llx", (long long) value.v);
 	}
@@ -109,7 +109,7 @@
     }
     if (off > (off_t)size) {
 	if (verbose)
-	    printf(NLS::TEXT("failed (offset past data)\n"));
+	    printf("%s", NLS::TEXT("failed (offset past data)\n"));
 	return (false);
     }
     bool ok = false;
@@ -162,7 +162,7 @@
 	    break;
 	}
 	if (verbose)
-	    printf(NLS::TEXT("failed (insufficient data)\n"));
+	    printf("%s", NLS::TEXT("failed (insufficient data)\n"));
 	return (false);
     case LONG:
 	if (off + 4 < (off_t)size) {
@@ -171,7 +171,7 @@
 	    break;
 	}
 	if (verbose)
-	    printf(NLS::TEXT("failed (insufficient data)\n"));
+	    printf("%s", NLS::TEXT("failed (insufficient data)\n"));
 	return (false);
     }
     /*
@@ -195,7 +195,7 @@
 	    printf(NLS::TEXT("success (result %s, rule \"%s\")\n"),
 		resultNames[result], (const char*) cmd);
 	else
-	    printf(NLS::TEXT("failed (comparison)\n"));
+	    printf("%s", NLS::TEXT("failed (comparison)\n"));
     }
     return (ok);
 }
@@ -496,6 +496,6 @@
 	    return (&(*rules)[i + match2(i, data, size, verbose)]);
     }
     if (verbose)
-	printf(NLS::TEXT("no match\n"));
+	printf("%s", NLS::TEXT("no match\n"));
     return (NULL);
 }
Index: hylafax-6.1~20111227/faxd/Makefile.in
===================================================================
--- hylafax-6.1~20111227.orig/faxd/Makefile.in	2012-03-15 21:23:09.009195977 +0100
+++ hylafax-6.1~20111227/faxd/Makefile.in	2012-03-15 21:23:47.233197432 +0100
@@ -181,7 +181,7 @@
 hash.h:	mkhash
 	rm -f hash.h; ./mkhash > hash.h
 mkhash:	${SRCDIR}/mkhash.c
-	${CCF} -o mkhash ${SRCDIR}/mkhash.c
+	${CCF} -o mkhash ${SRCDIR}/mkhash.c ${LDFLAGS_ENV}
 
 faxQueueApp.o FaxRecv.o:
 incdepend: hash.h
Index: hylafax-6.1~20111227/etc/Makefile.in
===================================================================
--- hylafax-6.1~20111227.orig/etc/Makefile.in	2012-03-15 21:23:09.009195977 +0100
+++ hylafax-6.1~20111227/etc/Makefile.in	2012-03-15 21:23:47.233197432 +0100
@@ -70,9 +70,9 @@
 config.fax:
 	${ECHO} on >config.fax
 lockname: ${SRCDIR}/lockname.c
-	${CCF} -o $@ ${SRCDIR}/lockname.c
+	${CCF} -o $@ ${SRCDIR}/lockname.c ${LDFLAGS_ENV}
 ondelay: ${SRCDIR}/ondelay.c
-	${CCF} -o $@ ${SRCDIR}/ondelay.c
+	${CCF} -o $@ ${SRCDIR}/ondelay.c ${LDFLAGS_ENV}
 
 PUTSERVER	= ${INSTALL} -idb ${PRODUCT}.sw.server
 PUTSAMPLE	= ${PUTSERVER} -u ${FAXUSER} -g ${FAXGROUP} \
Index: hylafax-6.1~20111227/libhylafax/Makefile.LINUXdso
===================================================================
--- hylafax-6.1~20111227.orig/libhylafax/Makefile.LINUXdso	2012-03-15 21:23:09.009195977 +0100
+++ hylafax-6.1~20111227/libhylafax/Makefile.LINUXdso	2012-03-15 21:23:47.233197432 +0100
@@ -36,7 +36,7 @@
 libhylafax-${ABI_VERSION}.${DSO}.${ABI_PATCH}:	${OBJECTS}
 	${C++} ${DSOOPTS} -o $@ ${OBJECTS} \
 	    ${DSODELAY} ${LIBTIFF} ${DSODELAY} ${LIBZ} ${DSODELAY} ${LIBREGEX} \
-	    ${MACHDEPLIBS}
+	    ${MACHDEPLIBS} ${LDFLAGS_ENV}
 
 #../util/libhylafax-${ABI_VERSION}.${DSO}: libhylafax-${ABI_VERSION}.${DSO}