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
|
Author: Roland Rosenfeld <roland@debian.org>
Description: Add a format string to fprintf()/sprintf() call instead
of directly printing out Err_Mem. This is needed by harding options.
--- a/fig2dev/trans_spline.c
+++ b/fig2dev/trans_spline.c
@@ -648,7 +648,7 @@
F_control *cp;
if ((cp = (F_control *) malloc(CONTROL_SIZE)) == NULL)
- fprintf(stderr,Err_mem);
+ fprintf(stderr, "%s", Err_mem);
return cp;
}
@@ -659,7 +659,7 @@
F_line *l;
if ((l = (F_line *) malloc(LINOBJ_SIZE)) == NULL)
- fprintf(stderr,Err_mem);
+ fprintf(stderr, "%s", Err_mem);
l->pic = NULL;
l->next = NULL;
l->for_arrow = NULL;
--- a/fig2dev/dev/gencgm.c
+++ b/fig2dev/dev/gencgm.c
@@ -139,7 +139,7 @@
if (from) {
figname = malloc(strlen(from)+1);
- sprintf(figname, from);
+ sprintf(figname, "%s", from);
p = strrchr(figname, '/');
if (p)
figname = p+1; /* remove path from name for comment in file */
--- a/fig2dev/dev/genmp.c
+++ b/fig2dev/dev/genmp.c
@@ -1150,7 +1150,7 @@
}
} else {
/* special text in latex mode: just write the text. */
- fprintf(tfp, t->cstring);
+ fprintf(tfp, "%s", t->cstring);
}
fprintf(tfp," etex;\n");
@@ -1164,7 +1164,7 @@
fprintf(tfp," picture q;\n");
fprintf(tfp," q=thelabel.urt(\"");
- fprintf(tfp, t->cstring);
+ fprintf(tfp, "%s", t->cstring);
fprintf(tfp, "\" infont ");
if (t->font<0) {
fprintf(tfp, "defaultfont");
|