diff options
author | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2015-08-23 11:16:32 +0000 |
---|---|---|
committer | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2015-08-23 11:16:32 +0000 |
commit | aebd8396c735335e0db69b8152073da6b68d17f9 (patch) | |
tree | 9fcb2ceb1eae2baa612512b4f86c306fc8d3cf0f /Build/source/texk/mendexk/main.c | |
parent | 35e1fcf00be8bcbb614978046b714a3f2425dc3f (diff) |
texk/mendexk: Bug fix (segmentation fault) due to r.38182
git-svn-id: svn://tug.org/texlive/trunk@38186 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/mendexk/main.c')
-rw-r--r-- | Build/source/texk/mendexk/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Build/source/texk/mendexk/main.c b/Build/source/texk/mendexk/main.c index 3790a79b0cd..739b449d9f6 100644 --- a/Build/source/texk/mendexk/main.c +++ b/Build/source/texk/mendexk/main.c @@ -278,11 +278,11 @@ int main(int argc, char **argv) } if (i==-1) sprintf(logfile,"%s.ilg",idxfile[0]); } - if ((logfile[0] != '\0') && kpse_out_name_ok(logfile)) + if (logfile && kpse_out_name_ok(logfile)) efp=fopen(logfile,"wb"); if(efp == NULL) { efp=stderr; - strcpy(logfile,"stderr"); + logfile=xstrdup("stderr"); } if (strcmp(argv[0],"makeindex")==0) { @@ -399,7 +399,7 @@ int main(int argc, char **argv) verb_printf(efp,"...done.\n"); - if (idxcount-fsti==0) strcpy(indfile,"stdout"); + if (idxcount-fsti==0) indfile=xstrdup("stdout"); verb_printf(efp,"%d warnings, written in %s.\n",warn,logfile); verb_printf(efp,"Output written in %s.\n",indfile); |