diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-18 23:37:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-18 23:37:40 +0000 |
commit | 5a7afe81bee328e80159360453149a7c91a7d51f (patch) | |
tree | c6559b261d272d8f823eaa9d7dc168f9682b7a4c /Build/source | |
parent | af63df4dc164e1151fbb1a9fff04b32d3f433016 (diff) |
check for tfm file name overflow (yan.i.li, 18 Jun 2010 16:18:29)
git-svn-id: svn://tug.org/texlive/trunk@19049 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/tfmload.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 56392617608..3fc0375ba63 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,8 @@ +2010-06-19 Yan Li <yan.i.li@intel.com> + + * tfmload.c (name): increase size to 500. + (badtfm): check for name length overflow. + 2010-06-13 Karl Berry <karl@tug.org> * dvips.texi: update for 2010. diff --git a/Build/source/texk/dvipsk/tfmload.c b/Build/source/texk/dvipsk/tfmload.c index 80024a47312..b858951204c 100644 --- a/Build/source/texk/dvipsk/tfmload.c +++ b/Build/source/texk/dvipsk/tfmload.c @@ -16,7 +16,7 @@ FILE *tfmfile; /* * Our static variables: */ -static char name[50]; +static char name[500]; void badtfm(const char *s) @@ -39,6 +39,10 @@ tfmopen(register fontdesctype *fd) register char *d; #endif n = fd->name; + if (strlen(n) + 6 >= sizeof (name)) { + /* 6 for tfm() + null */ + error("! TFM file name too long in tfmopen") ; + } if (!noomega) { #ifdef KPATHSEA d = ofmpath; |