Re: Returning stack-allocated memory in gettext.h

2025-06-19 Thread Markus Mützel
Am 19. Juni 2025 um 20:51 schrieb "Bruno Haible": > Markus Mützel wrote: > > > [1] https://lists.gnu.org/archive/html/bug-gettext/2023-07/msg3.html > > > [2] https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00148.html > > > > > > Thank you for the quick reply and for these pointers. >

Re: Returning stack-allocated memory in gettext.h

2025-06-19 Thread Bruno Haible via Gnulib discussion list
Markus Mützel wrote: > > [1] https://lists.gnu.org/archive/html/bug-gettext/2023-07/msg3.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 retu

Re: Returning stack-allocated memory in gettext.h

2025-06-19 Thread Markus Mützel
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

Re: Returning stack-allocated memory in gettext.h

2025-06-19 Thread Bruno Haible via Gnulib discussion list
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] a

Returning stack-allocated memory in gettext.h

2025-06-19 Thread Markus Mützel
Hello, 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. If I'm reading that file correctly, "translation" got assigned with "msg_ctxt_i

Re: CodeQL warning about returning stack-allocated memory in gettext.h

2023-11-14 Thread Eric Gallager
On Tue, Nov 14, 2023 at 8:14 PM Bruno Haible wrote: > > Hi, > > Eric Gallager wrote: > > Hi, I have a project that uses gnulib's gettext.h, and also has CodeQL > > scanning turned on in GitHub. In this project, CodeQL warns about the > > "return translation;" statement on line 247 of gettext.h, sa

Re: CodeQL warning about returning stack-allocated memory in gettext.h

2023-11-14 Thread Bruno Haible
Hi, Eric Gallager wrote: > Hi, I have a project that uses gnulib's gettext.h, and also has CodeQL > scanning turned on in GitHub. In this project, CodeQL warns about the > "return translation;" statement on line 247 of gettext.h, saying that > it "May return stack-allocated memory from msg_ctxt_id

CodeQL warning about returning stack-allocated memory in gettext.h

2023-11-14 Thread Eric Gallager
Hi, I have a project that uses gnulib's gettext.h, and also has CodeQL scanning turned on in GitHub. In this project, CodeQL warns about the "return translation;" statement on line 247 of gettext.h, saying that it "May return stack-allocated memory from msg_ctxt_id." The rule implementing this chec