On 2024-09-10 14:32:32 +0100, Geoff Clare via austin-group-l at The Open Group wrote: > I can see that my earlier statement was a bit misleading. There doesn't > need to be an explicit statement that passing a null pointer is allowed, > just something that overrides that quoted text from 2.1.1. > > The relevant part of 2.1.1 is of the form "unless explicitly stated > otherwise ... the behavior is undefined". Any text that defines the > behaviour for a null pointer is sufficient to override this.
The case strnlen(0,0) is well defined by the strnlen description: the result is necessarily 0. So it is valid, isn't it? -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
