diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-30 01:50:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-30 01:50:10 +0000 |
commit | 65969e10793eca240081c7f36b6b844c243dba00 (patch) | |
tree | 7431f36020419306449becf20e165ddfc645b79a /Build/source/texk/dvipsk/flib.c | |
parent | d26a25bf0e44eaad0cad5ddbcc71d69de823eb3f (diff) |
avoid arbitrary %s sprintf into fixed errbuf
git-svn-id: svn://tug.org/texlive/trunk@50650 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk/flib.c')
-rw-r--r-- | Build/source/texk/dvipsk/flib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Build/source/texk/dvipsk/flib.c b/Build/source/texk/dvipsk/flib.c index 4a93bab9dc9..8b5e88e9bb4 100644 --- a/Build/source/texk/dvipsk/flib.c +++ b/Build/source/texk/dvipsk/flib.c @@ -243,7 +243,7 @@ flisearch(char *n, halfword dpi) fli_cache[i] = fli_cache[i-1]; /* put this font library at front */ if ( (pkfile=search(flipath,lib->name,READBIN)) == (FILE *)NULL ) { - sprintf(errbuf,"Can't reopen font library %s", lib->name); + sprintf(errbuf,"Can't reopen font library %.500s", lib->name); error(errbuf); return((FILE *)NULL); } @@ -253,7 +253,7 @@ flisearch(char *n, halfword dpi) } flib = 1; /* tell loadfont() not to close it */ /* then seek font within library */ - sprintf(name,"%s %s %ddpi",lib->name, n, dpi1); + sprintf(name,"%.500s %.500s %ddpi",lib->name, n, dpi1); if (fseek(pkfile,entry->offset,0) ) badpk("couldn't seek font"); /* make sure it is a PK font */ @@ -263,7 +263,7 @@ flisearch(char *n, halfword dpi) badpk("couldn't seek font"); return(pkfile); /* found it */ } - sprintf(errbuf,"%s %s %ddpi isn't PK format, ignoring", + sprintf(errbuf,"%.500s %.500s %ddpi isn't PK format, ignoring", lib->name, n, dpi1); error(errbuf); } /* end if name correct */ |