Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 18 Oct 2022 21:42:49 -0700
From: Keith Packard <>
To: Pascal Cuoq <>, ""
Subject: Re: fgets behavior for n<=0 (and =1)

Pascal Cuoq <> writes:

> It is probably too late for C23, but I can submit a C standard change
> making calling fgets with n<=0 implementation-defined. This would
> allow all current behaviors including the "you're holding it wrong"
> aborts.

Sure would be nice to move towards less ID/UB somehow, instead of just
leaving traps like that around the API.


Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.