summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2019-01-23 07:19:27 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2019-01-23 07:19:27 +0000
commit4896ddb128c635acc952ef9399d4644638a2cb7c (patch)
tree418cfce121252146f5e9f3e7ef16d33a10e67cf8 /Build/source/texk/web2c/mplibdir
parentb8b912ff8cf82db8d897ad938692c537e04c5d2c (diff)
MetaPost: fixed buffer overflow. LuaTeX: updated dev. id.
git-svn-id: svn://tug.org/texlive/trunk@49796 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mplibdir')
-rw-r--r--Build/source/texk/web2c/mplibdir/mp.w7
1 files changed, 5 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w
index 8afa03cd21c..2b9bc6c6672 100644
--- a/Build/source/texk/web2c/mplibdir/mp.w
+++ b/Build/source/texk/web2c/mplibdir/mp.w
@@ -756,7 +756,7 @@ defined.
@<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 @@ to the input buffer. The variable |command_line| will be filled by the
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 @@ static void mp_cubic_intersection (MP mp, mp_knot p, mp_knot pp) {
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: