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
|
Description: upstream source -- format-security warnings
Silence the security-warning's as emitted by gcc at the time of
packaging; meant to be submitted to the upstream maintainer team.
Origin: debian
Forwarded: no-more-maintained-by-upstream
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2015-05-18
--- a/probdist/gofw.c
+++ b/probdist/gofw.c
@@ -96,8 +96,7 @@
} else {
sprintf (S, "%16.8g", x);
}
- fprintf (f, S);
- fprintf (f, ", ");
+ fprintf (f, "%s, ", S);
if (y != 0.0 && (y < 0.1 || y > 1.0)) {
sprintf (S, "%16.7E", y);
@@ -106,8 +105,7 @@
} else {
sprintf (S, "%16.8g", y);
}
- fprintf (f, S);
- fprintf (f, " }");
+ fprintf (f, "%s }", S);
}
/*--------------------------------------------------------------------------*/
@@ -626,7 +624,7 @@
{
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);
--- a/testu01/scatter.c
+++ b/testu01/scatter.c
@@ -425,7 +425,7 @@
/* 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 = ");
@@ -545,7 +545,7 @@
strncpy (Title, gen->name, (size_t) len);
Title[len] = '\0';
}
- /* Search for '\n' in title. If it is there, it will not be understood by
+ /* Search for '\n' in title. If it is there, it will not be understood by
gnuplot. Process it specially to print the generator name */
p = strchr (gen->name, '\n');
if (p) {
@@ -556,16 +556,15 @@
*p = '\0';
len = strlen (q);
if (len > 0) {
- fprintf (f, q);
- fprintf (f, ";\\n");
+ fprintf (f, "%s;\\n", q);
}
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 +594,14 @@
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");
--- a/testu01/swrite.c
+++ b/testu01/swrite.c
@@ -149,7 +149,7 @@
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 @@
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);
}
|