diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2014-01-29 23:37:05 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2014-01-29 23:37:05 +0000 |
commit | cdd246c8e9cefa72b4159eb3e3f69d3360dffa51 (patch) | |
tree | 6b7c539390e0856a3102a7c63dff71d850a9f663 /Build/source/texk/web2c/mplibdir/mpost.w | |
parent | 165fe25f93e0efdd87ed408f2bbfce3d09b1b683 (diff) |
Imported from MetaPost trunk
git-svn-id: svn://tug.org/texlive/trunk@32820 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mplibdir/mpost.w')
-rw-r--r-- | Build/source/texk/web2c/mplibdir/mpost.w | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/mplibdir/mpost.w b/Build/source/texk/web2c/mplibdir/mpost.w index fb4d1967ac1..ab444e20f9c 100644 --- a/Build/source/texk/web2c/mplibdir/mpost.w +++ b/Build/source/texk/web2c/mplibdir/mpost.w @@ -1,4 +1,4 @@ -% $Id: mpost.w 1916 2013-06-13 10:19:49Z taco $ +% $Id: mpost.w 1931 2014-01-29 12:19:20Z taco $ % % This file is part of MetaPost; % the MetaPost program is in the public domain. @@ -546,7 +546,7 @@ static char *mpost_find_file(MP mp, const char *fname, const char *fmode, int ft char *s; (void)mp; s = NULL; - if ((fmode[0]=='r' && !kpse_in_name_ok(fname)) || + if (fname == NULL || (fmode[0]=='r' && !kpse_in_name_ok(fname)) || (fmode[0]=='w' && !kpse_out_name_ok(fname))) return NULL; /* disallowed filename */ if (fmode[0]=='r') { |