bug#78880: od Heap-buffer overflow

Grisha Levit <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <CAMu=BrpXFvoKSq6jqGiiB0KAEcUjmsbGbcVfH18UJ_mUC3hvTg@mail.gmail.com>
On Tue, Jun 24, 2025, 12:34 Collin Funk <[email protected]> wrote:
>
> Pádraig Brady <[email protected]> writes:
>
> > On 24/06/2025 15:27, Grisha Levit wrote:
> >
> >> This part:
> >>
> >>>         tryline:
> >>>     +     idx_t i = 0;
> >>>     +     int c = 1; /* Init to 1 so can distinguish if NUL read. */
> >> triggers
> >>      warning: label followed by a declaration is a C23 extension
> >> [-Wc23-extensions]
> >
> > OK version 3 attached which simplifies
> > by removing the label and gotos entirely.
>
> Grisha, what did you pass to ./configure?
>
> I'm suprised we don't disable this in Gnulib. Since there we do:
>
>     static_assert (1 < sizeof (example))
>
> Without a second argument message string, I would expect Clang to
> complain about it, unless we disable it.

Sorry, TBH I didn't do a proper build, I just remembered the
discussion at [1] while reading the patch.

[1] https://lists.gnu.org/r/bug-gnulib/2024-04/msg00044.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.