texlive[49796] Build/source/texk/web2c: MetaPost: fixed buffer
commits+lscarso at tug.org
commits+lscarso at tug.org
Wed Jan 23 08:19:27 CET 2019
Revision: 49796
http://tug.org/svn/texlive?view=revision&revision=49796
Author: lscarso
Date: 2019-01-23 08:19:27 +0100 (Wed, 23 Jan 2019)
Log Message:
-----------
MetaPost: fixed buffer overflow. LuaTeX: updated dev. id.
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 2019-01-23 01:24:05 UTC (rev 49795)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h 2019-01-23 07:19:27 UTC (rev 49796)
@@ -1 +1 @@
-#define luatex_svn_revision 7047
+#define luatex_svn_revision 7056
Modified: trunk/Build/source/texk/web2c/mplibdir/mp.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/mp.w 2019-01-23 01:24:05 UTC (rev 49795)
+++ trunk/Build/source/texk/web2c/mplibdir/mp.w 2019-01-23 07:19:27 UTC (rev 49796)
@@ -756,7 +756,7 @@
@<Glob...@>=
integer bad; /* is some ``constant'' wrong? */
-@ Later on we will say `|if ( int_packets+(17+3)*int_increment>bistack_size )mp->bad=19;|',
+@ Later on we will say `|if ( int_packets+(17+2)*int_increment>bistack_size )mp->bad=19;|',
or something similar.
In case you are wondering about the non-consequtive values of |bad|: most
@@ -1253,6 +1253,9 @@
mp->term_in = (mp->open_file)(mp,"terminal", "r", mp_filetype_terminal);
if (mp->command_line!=NULL) {
mp->last = strlen(mp->command_line);
+ if (mp->last > (mp->buf_size+1)) {
+ mp_reallocate_buffer(mp,mp->last);
+ }
(void)memcpy((void *)mp->buffer,(void *)mp->command_line,mp->last);
xfree(mp->command_line);
} else {
@@ -15774,7 +15777,7 @@
set_number_from_scaled (mp->max_t, 2);
new_number (x_two_t);
number_clone (x_two_t,two_t);
- number_double(x_two_t); number_double(x_two_t); /* add x=3 bit of precision */
+ number_double(x_two_t); number_double(x_two_t); /* add x=2 bit of precision */
number_double(x_two_t);
@<Initialize for intersections at level zero@>;
CONTINUE:
More information about the tex-live-commits
mailing list