texlive[59262] Build/source/texk/mendexk: mendex: ver.0.56, fix bug
commits+takuji at tug.org
commits+takuji at tug.org
Wed May 19 10:02:22 CEST 2021
Revision: 59262
http://tug.org/svn/texlive?view=revision&revision=59262
Author: takuji
Date: 2021-05-19 10:02:22 +0200 (Wed, 19 May 2021)
Log Message:
-----------
mendex: ver.0.56, fix bug in reading style file
Modified Paths:
--------------
trunk/Build/source/texk/mendexk/ChangeLog
trunk/Build/source/texk/mendexk/configure
trunk/Build/source/texk/mendexk/configure.ac
trunk/Build/source/texk/mendexk/exvar.h
trunk/Build/source/texk/mendexk/styfile.c
trunk/Build/source/texk/mendexk/var.h
trunk/Build/source/texk/mendexk/version.h
Modified: trunk/Build/source/texk/mendexk/ChangeLog
===================================================================
--- trunk/Build/source/texk/mendexk/ChangeLog 2021-05-18 23:48:37 UTC (rev 59261)
+++ trunk/Build/source/texk/mendexk/ChangeLog 2021-05-19 08:02:22 UTC (rev 59262)
@@ -1,3 +1,12 @@
+2021-05-19 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * main.c, configure.ac, version.h:
+ Version 3.4 [19-May-2021].
+ * styfile.c, var.h, exvar.h:
+ Fix a bug of reading keywords "setpage_prefix", "setpage_suffix"
+ in style file.
+ More strictly check string length.
+
2021-05-09 Karl Berry <karl at freefriends.org>
* mendex.h (page.attr): use int, not char, since we do signed
Modified: trunk/Build/source/texk/mendexk/configure
===================================================================
--- trunk/Build/source/texk/mendexk/configure 2021-05-18 23:48:37 UTC (rev 59261)
+++ trunk/Build/source/texk/mendexk/configure 2021-05-19 08:02:22 UTC (rev 59262)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mendex (TeX Live) 3.3.
+# Generated by GNU Autoconf 2.69 for mendex (TeX Live) 3.4.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
# Identity of this package.
PACKAGE_NAME='mendex (TeX Live)'
PACKAGE_TARNAME='mendex--tex-live-'
-PACKAGE_VERSION='3.3'
-PACKAGE_STRING='mendex (TeX Live) 3.3'
+PACKAGE_VERSION='3.4'
+PACKAGE_STRING='mendex (TeX Live) 3.4'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1329,7 +1329,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures mendex (TeX Live) 3.3 to adapt to many kinds of systems.
+\`configure' configures mendex (TeX Live) 3.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1400,7 +1400,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mendex (TeX Live) 3.3:";;
+ short | recursive ) echo "Configuration of mendex (TeX Live) 3.4:";;
esac
cat <<\_ACEOF
@@ -1521,7 +1521,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mendex (TeX Live) configure 3.3
+mendex (TeX Live) configure 3.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2173,7 +2173,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mendex (TeX Live) $as_me 3.3, which was
+It was created by mendex (TeX Live) $as_me 3.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -7855,7 +7855,7 @@
# Define the identity of the package.
PACKAGE='mendex--tex-live-'
- VERSION='3.3'
+ VERSION='3.4'
# Some tools Automake needs.
@@ -13907,7 +13907,7 @@
Report bugs to <bug-libtool at gnu.org>."
lt_cl_version="\
-mendex (TeX Live) config.lt 3.3
+mendex (TeX Live) config.lt 3.4
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -15516,7 +15516,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by mendex (TeX Live) $as_me 3.3, which was
+This file was extended by mendex (TeX Live) $as_me 3.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15582,7 +15582,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-mendex (TeX Live) config.status 3.3
+mendex (TeX Live) config.status 3.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Modified: trunk/Build/source/texk/mendexk/configure.ac
===================================================================
--- trunk/Build/source/texk/mendexk/configure.ac 2021-05-18 23:48:37 UTC (rev 59261)
+++ trunk/Build/source/texk/mendexk/configure.ac 2021-05-19 08:02:22 UTC (rev 59262)
@@ -8,7 +8,7 @@
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-AC_INIT([mendex (TeX Live)], [3.3])
+AC_INIT([mendex (TeX Live)], [3.4])
AC_PREREQ([2.63])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_AUX_DIR([../../build-aux])
Modified: trunk/Build/source/texk/mendexk/exvar.h
===================================================================
--- trunk/Build/source/texk/mendexk/exvar.h 2021-05-18 23:48:37 UTC (rev 59261)
+++ trunk/Build/source/texk/mendexk/exvar.h 2021-05-19 08:02:22 UTC (rev 59262)
@@ -6,29 +6,31 @@
extern struct index *ind;
-extern char keyword[2048];
+#define STYBUFSIZE 2048
+
+extern char keyword[];
extern char arg_open,arg_close;
extern char range_open,range_close;
extern char level,actual,encap,quote,escape;
-extern char preamble[2048],postamble[2048];
-extern char setpage_prefix[2048],setpage_suffix[2048];
-extern char group_skip[2048];
-extern char lethead_prefix[2048],lethead_suffix[2048];
+extern char preamble[],postamble[];
+extern char setpage_prefix[],setpage_suffix[];
+extern char group_skip[];
+extern char lethead_prefix[],lethead_suffix[];
extern int lethead_flag;
-extern char item_0[2048],item_1[2048],item_2[2048];
-extern char item_01[2048],item_x1[2048],item_12[2048],item_x2[2048];
-extern char delim_0[2048],delim_1[2048],delim_2[2048],delim_n[2048],delim_r[2048],delim_t[2048];
-extern char suffix_2p[2048],suffix_3p[2048],suffix_mp[2048];
-extern char encap_prefix[2048],encap_infix[2048],encap_suffix[2048];
+extern char item_0[],item_1[],item_2[];
+extern char item_01[],item_x1[],item_12[],item_x2[];
+extern char delim_0[],delim_1[],delim_2[],delim_n[],delim_r[],delim_t[];
+extern char suffix_2p[],suffix_3p[],suffix_mp[];
+extern char encap_prefix[],encap_infix[],encap_suffix[];
extern int line_max;
-extern char indent_space[2048];
+extern char indent_space[];
extern int indent_length;
extern int priority;
-extern char symbol[2048];
-extern char symhead_positive[2048],symhead_negative[2048];
-extern char numhead_positive[2048],numhead_negative[2048];
+extern char symbol[];
+extern char symhead_positive[],symhead_negative[];
+extern char numhead_positive[],numhead_negative[];
extern int symbol_flag;
extern int letter_head;
-extern char atama[2048];
-extern char page_compositor[2048],page_precedence[2048];
-extern char character_order[2048];
+extern char atama[];
+extern char page_compositor[],page_precedence[];
+extern char character_order[];
Modified: trunk/Build/source/texk/mendexk/styfile.c
===================================================================
--- trunk/Build/source/texk/mendexk/styfile.c 2021-05-18 23:48:37 UTC (rev 59261)
+++ trunk/Build/source/texk/mendexk/styfile.c 2021-05-19 08:02:22 UTC (rev 59262)
@@ -63,6 +63,8 @@
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 @@
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 @@
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 @@
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++];
}
Modified: trunk/Build/source/texk/mendexk/var.h
===================================================================
--- trunk/Build/source/texk/mendexk/var.h 2021-05-18 23:48:37 UTC (rev 59261)
+++ trunk/Build/source/texk/mendexk/var.h 2021-05-19 08:02:22 UTC (rev 59262)
@@ -9,29 +9,29 @@
struct index *ind;
-char keyword[2048]={"\\indexentry"};
+char keyword[STYBUFSIZE]={"\\indexentry"};
char arg_open='{',arg_close='}';
char range_open='(',range_close=')';
char level='!',actual='@',encap='|',quote='\"',escape='\\';
-char preamble[2048]={"\\begin{theindex}\n"},postamble[2048]={"\n\n\\end{theindex}\n"};
-char setpage_prefix[2048]={"\n \\setcounter{page}{"},setpage_suffix[2048]={"}\n"};
-char group_skip[2048]={"\n\n \\indexspace\n"};
-char lethead_prefix[2048]={""},lethead_suffix[2048]={""};
+char preamble[STYBUFSIZE]={"\\begin{theindex}\n"},postamble[STYBUFSIZE]={"\n\n\\end{theindex}\n"};
+char setpage_prefix[STYBUFSIZE]={"\n \\setcounter{page}{"},setpage_suffix[STYBUFSIZE]={"}\n"};
+char group_skip[STYBUFSIZE]={"\n\n \\indexspace\n"};
+char lethead_prefix[STYBUFSIZE]={""},lethead_suffix[STYBUFSIZE]={""};
int lethead_flag=0;
-char item_0[2048]={"\n \\item "},item_1[2048]={"\n \\subitem "},item_2[2048]={"\n \\subsubitem "};
-char item_01[2048]={"\n \\subitem "},item_x1[2048]={"\n \\subitem "},item_12[2048]={"\n \\subsubitem "},item_x2[2048]={"\n \\subsubitem "};
-char delim_0[2048]={", "},delim_1[2048]={", "},delim_2[2048]={", "},delim_n[2048]={", "},delim_r[2048]={"--"},delim_t[2048]={""};
-char suffix_2p[2048]={""},suffix_3p[2048]={""},suffix_mp[2048]={""};
-char encap_prefix[2048]={"\\"},encap_infix[2048]={"{"},encap_suffix[2048]={"}"};
+char item_0[STYBUFSIZE]={"\n \\item "},item_1[STYBUFSIZE]={"\n \\subitem "},item_2[STYBUFSIZE]={"\n \\subsubitem "};
+char item_01[STYBUFSIZE]={"\n \\subitem "},item_x1[STYBUFSIZE]={"\n \\subitem "},item_12[STYBUFSIZE]={"\n \\subsubitem "},item_x2[STYBUFSIZE]={"\n \\subsubitem "};
+char delim_0[STYBUFSIZE]={", "},delim_1[STYBUFSIZE]={", "},delim_2[STYBUFSIZE]={", "},delim_n[STYBUFSIZE]={", "},delim_r[STYBUFSIZE]={"--"},delim_t[STYBUFSIZE]={""};
+char suffix_2p[STYBUFSIZE]={""},suffix_3p[STYBUFSIZE]={""},suffix_mp[STYBUFSIZE]={""};
+char encap_prefix[STYBUFSIZE]={"\\"},encap_infix[STYBUFSIZE]={"{"},encap_suffix[STYBUFSIZE]={"}"};
int line_max=72;
-char indent_space[2048]={"\t\t"};
+char indent_space[STYBUFSIZE]={"\t\t"};
int indent_length=16;
int priority=0;
-char symbol[2048]={""};
-char symhead_positive[2048]={"Symbols"},symhead_negative[2048]={"symbols"};
-char numhead_positive[2048]={"Numbers"},numhead_negative[2048]={"numbers"};
+char symbol[STYBUFSIZE]={""};
+char symhead_positive[STYBUFSIZE]={"Symbols"},symhead_negative[STYBUFSIZE]={"symbols"};
+char numhead_positive[STYBUFSIZE]={"Numbers"},numhead_negative[STYBUFSIZE]={"numbers"};
int symbol_flag=1;
int letter_head=1;
-char atama[2048];
-char page_compositor[2048]={"-"},page_precedence[2048]={"rnaRA"};
-char character_order[2048]={"SNEJ"};
+char atama[STYBUFSIZE];
+char page_compositor[STYBUFSIZE]={"-"},page_precedence[STYBUFSIZE]={"rnaRA"};
+char character_order[STYBUFSIZE]={"SNEJ"};
Modified: trunk/Build/source/texk/mendexk/version.h
===================================================================
--- trunk/Build/source/texk/mendexk/version.h 2021-05-18 23:48:37 UTC (rev 59261)
+++ trunk/Build/source/texk/mendexk/version.h 2021-05-19 08:02:22 UTC (rev 59262)
@@ -1,2 +1,2 @@
-#define VERSION "version " PACKAGE_VERSION " [21-Mar-2021]"
+#define VERSION "version " PACKAGE_VERSION " [19-May-2021]"
#define BUG_ADDRESS "issue at texjp.org"
More information about the tex-live-commits
mailing list.