-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestU01-format-security.patch
97 lines (91 loc) · 3.05 KB
/
TestU01-format-security.patch
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
--- ./probdist/gofw.c.orig 2016-02-21 23:01:43.623302136 +0000
+++ ./probdist/gofw.c 2016-02-21 23:06:16.232546366 +0000
@@ -96,7 +96,7 @@ static void printMath2 (FILE * f, double
} else {
sprintf (S, "%16.8g", x);
}
- fprintf (f, S);
+ fprintf (f, "%s", S);
fprintf (f, ", ");
if (y != 0.0 && (y < 0.1 || y > 1.0)) {
@@ -106,7 +106,7 @@ static void printMath2 (FILE * f, double
} else {
sprintf (S, "%16.8g", y);
}
- fprintf (f, S);
+ fprintf (f, "%s", S);
fprintf (f, " }");
}
@@ -626,7 +626,7 @@ void gofw_WriteActiveTests2 (long N, gof
{
printf ("\n-----------------------------------------------\n");
if (N == 1) {
- printf (S);
+ printf ("%s", S);
gofw_Writep2 (sVal[gofw_Mean], pVal[gofw_Mean]);
} else {
gofw_WriteActiveTests0 (N, sVal, pVal);
--- ./testu01/swrite.c.orig 2016-02-21 23:09:51.232740810 +0000
+++ ./testu01/swrite.c 2016-02-21 23:10:36.986417307 +0000
@@ -149,7 +149,7 @@ void swrite_Chi2SumTest (long N, sres_Ch
return;
printf ("Test on the sum of all N observations\n");
swrite_AddStrChi (str, LENGTH, N*res->degFree);
- printf (str);
+ printf ("%s", str);
gofw_Writep2 (res->sVal2[gofw_Sum], res->pVal2[gofw_Sum]);
}
@@ -163,7 +163,7 @@ void swrite_Chi2SumTestb (long N, double
return;
printf ("Test on the sum of all N observations\n");
swrite_AddStrChi (str, LENGTH, N*degFree);
- printf (str);
+ printf ("%s", str);
gofw_Writep2 (sval, pval);
}
--- ./testu01/scatter.c.orig 2016-02-21 23:11:11.033919987 +0000
+++ ./testu01/scatter.c 2016-02-21 23:13:17.326779197 +0000
@@ -425,7 +425,7 @@ static void BottomGraphTex (
/* Replace the _ in the generator name by \_ for Latex */
mystr_Subst (Title, "_", "\\_");
mystr_Subst (Title, "01_", "01\\_");
- fprintf (f, Title);
+ fprintf (f, "%s", Title);
fprintf (f, "\n\nHypercube in %1d dimensions.\\\\\n", scatter_t);
fprintf (f, " Over = ");
@@ -556,16 +556,16 @@ static void HeadGraphGnu (
*p = '\0';
len = strlen (q);
if (len > 0) {
- fprintf (f, q);
+ fprintf (f, "%s", q);
fprintf (f, ";\\n");
}
p++;
q = p;
p = strchr (q, '\n');
}
- fprintf (f, q);
+ fprintf (f, "%s", q);
} else
- fprintf (f, Title);
+ fprintf (f, "%s", Title);
fprintf (f, ";\\n N = %1ld", scatter_N);
fprintf (f, "; t = %1d", scatter_t);
@@ -595,14 +595,14 @@ static void HeadGraphGnu (
strcat (Nout3, ".ps");
/* Postscript file for figure */
fprintf (f, "set output \"");
- fprintf (f, Nout3);
+ fprintf (f, "%s", Nout3);
fprintf (f, "\"\nset term postscript");
} else if (scatter_Output == scatter_gnu_term) {
fprintf (f, "set output\n");
fprintf (f, "set term x11");
}
fprintf (f, "\nplot \"");
- fprintf (f, Nout2);
+ fprintf (f, "%s", Nout2);
fprintf (f, "\"\n");
if (scatter_Output == scatter_gnu_term) {
fprintf (f, "pause -1 \"Hit return to continue \"\n");