diff options
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/makejvf/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/makejvf/main.c | 3 | ||||
-rw-r--r-- | Build/source/texk/makejvf/tfmread.c | 4 |
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; } |