From 2b72a285e002b9410594cfc2151ba680f827ba2c Mon Sep 17 00:00:00 2001 From: Luigi Scarso Date: Sun, 24 Mar 2019 00:13:28 +0000 Subject: fixed " NULL; mp_xmalloc: use calloc instead of malloc to prevent use of un-initialized memory. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://tug.org/texlive/trunk@50560 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c | 2 +- Build/source/texk/web2c/luatexdir/lua/lpdfelib.c | 2 +- Build/source/texk/web2c/luatexdir/luatex_svnversion.h | 2 +- Build/source/texk/web2c/mplibdir/mp.w | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c b/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c index 09a51bd1063..1c2bd8533f0 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c @@ -1271,7 +1271,7 @@ static int set_char(lua_State * L) if (n < 2) return 0; name = lua_tolstring(L, 1, &lname); - if (name == null) + if (name == NULL) return 0; value = lua_tointeger(L, 2); if (value < 0) diff --git a/Build/source/texk/web2c/luatexdir/lua/lpdfelib.c b/Build/source/texk/web2c/luatexdir/lua/lpdfelib.c index 8f4f56d2d1e..455ed9b0479 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lpdfelib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lpdfelib.c @@ -259,7 +259,7 @@ define_to_string(stream, "pdfe.stream") static int pdfelib_tostring_reference(lua_State * L) { \ pdfe_reference *p = check_isreference(L, 1); \ if (p != NULL) { \ - lua_pushfstring(L, "", (int) p->onum); \ + lua_pushfstring(L, "", p->onum); \ return 1; \ } \ return 0; \ diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h index f82ab3bb193..75bbf0254f9 100644 --- a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h +++ b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h @@ -1 +1 @@ -#define luatex_svn_revision 7124 +#define luatex_svn_revision 7127 diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w index dc3a7e1b879..682fb4e53fc 100644 --- a/Build/source/texk/web2c/mplibdir/mp.w +++ b/Build/source/texk/web2c/mplibdir/mp.w @@ -2948,7 +2948,7 @@ void *mp_xmalloc (MP mp, size_t nmem, size_t size) { mp_jump_out (mp); } #endif - w = malloc (nmem * size); + w = calloc(nmem, size); /* TODO: check an un-initialize use of w and replace calloc with malloc. */ if (w == NULL) { mp_fputs ("Out of memory!\n", mp->err_out); mp->history = mp_system_error_stop; -- cgit v1.2.3