summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipsk/emspecial.c
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-10 15:47:35 +0000
committerKarl Berry <karl@freefriends.org>2010-05-10 15:47:35 +0000
commitc77ea29c114bf7516a1bac9039f978fc5c7e05ea (patch)
tree81efa8028252543fb70b55e903e90acf0b7c1081 /Build/source/texk/dvipsk/emspecial.c
parent3eaf4cd28aefe899e49bf2d77bd4b81be8792e24 (diff)
more snprintf
git-svn-id: svn://tug.org/texlive/trunk@18191 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk/emspecial.c')
-rw-r--r--Build/source/texk/dvipsk/emspecial.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Build/source/texk/dvipsk/emspecial.c b/Build/source/texk/dvipsk/emspecial.c
index eba9fdcacd9..c4ef067f2cc 100644
--- a/Build/source/texk/dvipsk/emspecial.c
+++ b/Build/source/texk/dvipsk/emspecial.c
@@ -142,7 +142,7 @@ float emwidth, emheight;
shalfword empoint1, empoint2;
struct empt *empoint;
char emunit[30];
-char emstr[250];
+char emstr[500];
char *emp;
hvpos();
@@ -153,7 +153,7 @@ char *emp;
sscanf(emp, "%f%2s", &emwidth, emunit);
emwidth = emunits(emwidth,emunit);
if (emwidth!=-1.0) {
- sprintf(emstr,"%.1f setlinewidth", emwidth);
+ snprintf(emstr, sizeof(emstr), "%.1f setlinewidth", emwidth);
cmdout(emstr);
#ifdef DEBUG
if (dd(D_SPECIAL))
@@ -252,7 +252,7 @@ char *emp;
#endif
strcpy(emstr,"currentlinewidth");
cmdout(emstr);
- sprintf(emstr,"%.1f setlinewidth", emwidth);
+ snprintf(emstr, sizeof(emstr), "%.1f setlinewidth", emwidth);
cmdout(emstr);
}
empoint = emptget(empoint1);
@@ -1372,7 +1372,7 @@ const char *extarr[]=
static void
emgraph(char *filename, float emwidth, float emheight)
{
- char fname[80];
+ char fname[500];
int filetype;
FILE *f;
char *env;
@@ -1439,7 +1439,8 @@ emgraph(char *filename, float emwidth, float emheight)
bmpgraph(f, fname, emwidth, emheight);
break;
default:
- sprintf(fname,"em:graph: %s: File not found", filename);
+ snprintf(fname, sizeof(fname),
+ "em:graph: %s: File not found", filename);
error(fname);
}
if (f != (FILE *)NULL)