texlive[59158] Build/source/texk/web2c: MetaPost: fixed the patch on
commits+lscarso at tug.org
commits+lscarso at tug.org
Mon May 10 15:02:08 CEST 2021
Revision: 59158
http://tug.org/svn/texlive?view=revision&revision=59158
Author: lscarso
Date: 2021-05-10 15:02:08 +0200 (Mon, 10 May 2021)
Log Message:
-----------
MetaPost: fixed the patch on the stack overflow.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
trunk/Build/source/texk/web2c/mplibdir/mp.w
Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h 2021-05-10 03:33:21 UTC (rev 59157)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h 2021-05-10 13:02:08 UTC (rev 59158)
@@ -1 +1 @@
-#define luatex_svn_revision 7438
+#define luatex_svn_revision 7439
Modified: trunk/Build/source/texk/web2c/mplibdir/mp.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/mp.w 2021-05-10 03:33:21 UTC (rev 59157)
+++ trunk/Build/source/texk/web2c/mplibdir/mp.w 2021-05-10 13:02:08 UTC (rev 59158)
@@ -18136,15 +18136,13 @@
@d push_input { /* enter a new input level, save the old */
if ( mp->input_ptr>mp->max_in_stack ) {
mp->max_in_stack=mp->input_ptr;
- /* The mp->stack_size < 1001 condition is necessary to prevent stack overflow due infinite recursion. */
- if ( mp->input_ptr==mp->stack_size && mp->stack_size < 1001) {
- int l = (mp->stack_size+(mp->stack_size/4));
- XREALLOC(mp->input_stack, l, in_state_record);
- mp->stack_size = l;
- } else {
- fprintf(stderr, "input stack overflow\n");
- exit(EXIT_FAILURE);
- }
+ if ( mp->input_ptr==mp->stack_size ) {
+ int l = (mp->stack_size+(mp->stack_size/4));
+ /* The mp->stack_size < 1001 condition is necessary to prevent C stack overflow due infinite recursion. */
+ if (l>1000) {fprintf(stderr, "input stack overflow\n");exit(EXIT_FAILURE);}
+ XREALLOC(mp->input_stack, l, in_state_record);
+ mp->stack_size = l;
+ }
}
mp->input_stack[mp->input_ptr]=mp->cur_input; /* stack the record */
incr(mp->input_ptr);
More information about the tex-live-commits
mailing list.