On Mon, Nov 14, 2022 at 09:48:50AM -0500, Greg Troxel wrote:
> That's why it is harder to meet the spec than it first seems.   C
> doesn't offer UB for such arguments, so it should be fixed.  (I'm not
> asking anyone to do the work - just to agree it's broken.)

I am not sure it is broken, but how would you fix it?
Effectively you could only detect the out of bounds maxlen and return
the value of strlen() instead - but that sounds like a super stupid idea.

Martin

Reply via email to