summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-02-23 23:39:05 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-02-23 23:39:05 +0000
commitf197512df144872566fa0dec858b3c9b914a1100 (patch)
tree611d80038eb6b2d4a6225f1ba4cb7715079e55e4 /Build/source
parent0c8e0812140de740c21f66df8827010d1323311c (diff)
support older compiler
git-svn-id: svn://tug.org/texlive/trunk@50108 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/makejvf/ChangeLog5
-rw-r--r--Build/source/texk/makejvf/main.c3
-rw-r--r--Build/source/texk/makejvf/tfmread.c4
3 files changed, 10 insertions, 2 deletions
diff --git a/Build/source/texk/makejvf/ChangeLog b/Build/source/texk/makejvf/ChangeLog
index 4afdb6139c3..3de15101b48 100644
--- a/Build/source/texk/makejvf/ChangeLog
+++ b/Build/source/texk/makejvf/ChangeLog
@@ -1,3 +1,8 @@
+2019-02-23 Akira Kakuto <kakuto@w32tex.org>
+
+ * main.c: Support old compiler.
+ * tfmread.c: Allocate one more byte for nbuff in tfmget().
+
2019-02-23 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* main.c, tfmread.c: Forbid invalid usages.
diff --git a/Build/source/texk/makejvf/main.c b/Build/source/texk/makejvf/main.c
index ade05cf4bf3..45d82bd78ec 100644
--- a/Build/source/texk/makejvf/main.c
+++ b/Build/source/texk/makejvf/main.c
@@ -20,6 +20,7 @@ int main(int argc, char ** argv)
int i,j;
int c;
long ch,ch_max;
+ const char *atfmname_base;
kpse_set_program_name(argv[0], "makejvf");
set_enc_string("sjis", "euc");
@@ -115,7 +116,7 @@ int main(int argc, char ** argv)
atfmname[strlen(atfmname)-4] = '\0';
}
- const char *atfmname_base = xbasename(atfmname);
+ atfmname_base = xbasename(atfmname);
vfname = xmalloc(strlen(atfmname_base)+4);
strcpy(vfname, atfmname_base);
strcat(vfname,".vf");
diff --git a/Build/source/texk/makejvf/tfmread.c b/Build/source/texk/makejvf/tfmread.c
index cf825cc28dc..5b4805d7e4e 100644
--- a/Build/source/texk/makejvf/tfmread.c
+++ b/Build/source/texk/makejvf/tfmread.c
@@ -96,7 +96,7 @@ int tfmget(char *name)
char *nbuff;
FILE *fp;
- nbuff = xmalloc(strlen(name)+4);
+ nbuff = xmalloc(strlen(name)+4+1);
strcpy(nbuff,name);
strcat(nbuff,".tfm");
fp = fopen(nbuff,"rb");
@@ -112,6 +112,8 @@ int tfmget(char *name)
fclose(fp);
+ free(nbuff);
+
return 0;
}