Am 19. Juni 2025 um 20:23 schrieb "Bruno Haible":
> Hi,
> 
> Markus Mützel wrote:
> > Building Octave with the CodeQL analyzer on GitHub gives the following 
> > alert in
> > a header from gnulib:
> > 
> > Returning stack-allocated memory
> > 
> > libgnu/gettext.h:254
> > May return stack-allocated memory from msg_ctxt_id.
> 
> It's a false alarm. Already answered in [1] and [2].
> 
> Bruno
> 
> [1] https://lists.gnu.org/archive/html/bug-gettext/2023-07/msg00003.html
> [2] https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00148.html


Thank you for the quick reply and for these pointers.

Just to clarify: You were writing that dcgettext will return either the second
argument, or a string that has indefinite extent.
If I understand correctly, the second argument runs out of scope when the
function returns.  Is that true?

Markus


Reply via email to