diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-05-19 08:02:22 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-05-19 08:02:22 +0000 |
commit | 20a6dacdb8442b72101911b8d239350c799af1c8 (patch) | |
tree | 01abe05a166c8a0982a86a0a90d3bc85caf3b60e /Build/source/texk/mendexk/styfile.c | |
parent | d6eddba56d9a1afe3d6a3392bc4dc4ac19b7ea84 (diff) |
mendex: ver.0.56, fix bug in reading style file
git-svn-id: svn://tug.org/texlive/trunk@59262 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/mendexk/styfile.c')
-rw-r--r-- | Build/source/texk/mendexk/styfile.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Build/source/texk/mendexk/styfile.c b/Build/source/texk/mendexk/styfile.c index e35256c2e29..387182f3a12 100644 --- a/Build/source/texk/mendexk/styfile.c +++ b/Build/source/texk/mendexk/styfile.c @@ -63,6 +63,8 @@ void styread(const char *filename) if (getparachar(buff,"escape",&escape)) continue; if (getparam(buff,"preamble",preamble)) continue; if (getparam(buff,"postamble",postamble)) continue; + if (getparam(buff,"setpage_prefix",setpage_prefix)) continue; + if (getparam(buff,"setpage_suffix",setpage_suffix)) continue; if (getparam(buff,"group_skip",group_skip)) continue; if (getparam(buff,"lethead_prefix",lethead_prefix)) continue; if (getparam(buff,"heading_prefix",lethead_prefix)) continue; @@ -90,7 +92,6 @@ void styread(const char *filename) if (getparam(buff,"item_0",item_0)) continue; if (getparam(buff,"item_1",item_1)) continue; if (getparam(buff,"item_2",item_2)) continue; - if (getparam(buff,"item_2",item_2)) continue; if (getparam(buff,"item_01",item_01)) continue; if (getparam(buff,"item_x1",item_x1)) continue; if (getparam(buff,"item_12",item_12)) continue; @@ -143,6 +144,10 @@ static void convline(char *buff1, int start, char *buff2) int i,j,cc; for (i=start,j=cc=0;;i++) { + if (j==STYBUFSIZE-1) { + buff2[j]='\0'; + break; + } if (buff1[i]=='\"') { if (cc==0) { cc=1; @@ -170,6 +175,10 @@ static void convline(char *buff1, int start, char *buff2) verb_printf(efp,"\nWarning: Illegal input of lead byte 0x%x in UTF-8.", (unsigned char)buff1[i]); continue; } + else if (j+len>STYBUFSIZE-1) { + buff2[j]='\0'; + break; + } while(len--) { buff2[j++]=buff1[i++]; } |