summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorTakuji Tanaka <KXD02663@nifty.ne.jp>2018-06-10 02:08:37 +0000
committerTakuji Tanaka <KXD02663@nifty.ne.jp>2018-06-10 02:08:37 +0000
commitb1b0a37f50014a4612d7c4e65cefad1a27ac6eff (patch)
tree20cfd14e821c2a8f86b448e0894cd337103e778e /Build/source/texk/web2c
parent809dc234256730f4dad05f27d87f834bc3be782a (diff)
pTeX: Avoid momory crash (Unix-like platform only)
git-svn-id: svn://tug.org/texlive/trunk@47972 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/lib/openclose.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c
index f39c3758d2c..9bb7ea148d9 100644
--- a/Build/source/texk/web2c/lib/openclose.c
+++ b/Build/source/texk/web2c/lib/openclose.c
@@ -324,7 +324,7 @@ open_output (FILE **f_ptr, const_string fopen_mode)
#if defined(PTEX) && !defined(WIN32)
fname0 = ptenc_from_internal_enc_string_to_utf8(fname);
if (fname0) {
- free(fname);
+ if (fname != nameoffile + 1) free(fname);
fname = fname0;
}
#endif