texlive[50560] Build/source/texk/web2c: fixed "<pdfe.reference "

commits+lscarso at tug.org commits+lscarso at tug.org
Sun Mar 24 01:13:28 CET 2019


Revision: 50560
          http://tug.org/svn/texlive?view=revision&revision=50560
Author:   lscarso
Date:     2019-03-24 01:13:28 +0100 (Sun, 24 Mar 2019)
Log Message:
-----------
fixed "<pdfe.reference " number formatter (thanks to M.Kruger); small fix: null -> NULL; mp_xmalloc: use calloc instead of malloc to prevent use of un-initialized memory.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c
    trunk/Build/source/texk/web2c/luatexdir/lua/lpdfelib.c
    trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
    trunk/Build/source/texk/web2c/mplibdir/mp.w

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c	2019-03-23 23:04:48 UTC (rev 50559)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c	2019-03-24 00:13:28 UTC (rev 50560)
@@ -1271,7 +1271,7 @@
     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)

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/lpdfelib.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/lpdfelib.c	2019-03-23 23:04:48 UTC (rev 50559)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/lpdfelib.c	2019-03-24 00:13:28 UTC (rev 50560)
@@ -259,7 +259,7 @@
 static int pdfelib_tostring_reference(lua_State * L) { \
     pdfe_reference *p = check_isreference(L, 1); \
     if (p != NULL) { \
-        lua_pushfstring(L, "<pdfe.reference " "%i>", (int) p->onum); \
+        lua_pushfstring(L, "<pdfe.reference " "%d>",  p->onum); \
         return 1; \
     } \
     return 0; \

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2019-03-23 23:04:48 UTC (rev 50559)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2019-03-24 00:13:28 UTC (rev 50560)
@@ -1 +1 @@
-#define luatex_svn_revision 7124
+#define luatex_svn_revision 7127

Modified: trunk/Build/source/texk/web2c/mplibdir/mp.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/mp.w	2019-03-23 23:04:48 UTC (rev 50559)
+++ trunk/Build/source/texk/web2c/mplibdir/mp.w	2019-03-24 00:13:28 UTC (rev 50560)
@@ -2948,7 +2948,7 @@
     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;



More information about the tex-live-commits mailing list