On Thu, Feb 19, 2026 at 06:25:25PM +0200, Eli Zaretskii wrote:
> > Date: Thu, 19 Feb 2026 17:17:11 +0100
> > From: Patrice Dumas <[email protected]>
> > Cc: [email protected], [email protected]
> >
> > On Thu, Feb 19, 2026 at 05:47:19PM +0200, Eli Zaretskii wrote:
> > > > Something that comes to me is that the libc includes are
> > > > before the Perl includes, before the comment /* Avoid namespace
> > > > conflicts. */
> > > > maybe you added the include later on, and it could matter?
> > >
> > > No, I added it before that.
> >
> > Maybe strndup is not defined/redefined by Perl at all, then. In that
> > case, maybe a solution could be to use our own Perl-compatible strndup
> > implementation, which is the perl_only_strndup function. I think that
> > the use of strndup in C code built against Perl headers is quite new, it
> > is possible that we never had code like that before.
>
> It's your call, I'm not familiar with the code enough to have an
> opinion. If you want me to try a patch, I can do that.
>
> The problem is not a grave one, in any case. The programs and
> libraries do build and pass all the tests. A complication warning is
> not a problem, and I can fix it by adding an explicit prototype in
> that source file. So the solution of this could be deferred to the
> next release, if you are okay with that.
Here's my attempt at a fix:
diff --git a/tta/C/convert/call_html_perl_function.c
b/tta/C/convert/call_html_perl_function.c
index 229fe424e7..816568a821 100644
--- a/tta/C/convert/call_html_perl_function.c
+++ b/tta/C/convert/call_html_perl_function.c
@@ -607,8 +607,9 @@ call_file_id_setting_redirection_file_names (CONVERTER
*self,
{
STRLEN len;
const char *file_ret = SvPVutf8 (file_sv, len);
- result_redirection_files[defined_count]
- = strndup (file_ret, len);
+ result_redirection_files[defined_count] = malloc (len + 1);
+ memcpy (result_redirection_files[defined_count], file_ret,
len);
+ result_redirection_files[defined_count][len] = '\0';
defined_count++;
}
}
This compiles cleanly but I haven't run the code (I don't know how to).