[luatex] A bug in show_context second line indentation
Hartmut Henkel
hartmut_henkel at gmx.de
Fri Oct 18 12:06:32 CEST 2024
Hi Luigi,
On Fri, 18 Oct 2024, luigi scarso wrote:
> On Thu, 17 Oct 2024 at 18:06, user202729--- via luatex <luatex at tug.org> wrote:
> b/source/texk/web2c/luatexdir/tex/printing.c
> index 8a52700..8ae11b4 100644
> --- a/source/texk/web2c/luatexdir/tex/printing.c
> +++ b/source/texk/web2c/luatexdir/tex/printing.c
> @@ -482,7 +482,8 @@ void tprint(const char *sss)
> }
> /*tex What is left is the 3 term/log settings. */
> if (dolog || doterm) {
> - buffer = xmalloc(strlen(sss)*3);
> + size_t len = strlen(sss);
> + buffer = xmalloc(len*3);
only looking here by accident, but google tells that UTF-8 is 1 to 4
bytes. So is "len*3" safe?
Best Regards
Hartmut
More information about the luatex
mailing list.