On Sun, Sep 20, 2026 at 06:34:32AM +0100, Greg KH wrote:
> WARN on the init makes more sense, but even then it feels odd as if we
> wanted to make a seq_buf with data from a device or userspace, we would
> have to verify the size is non-zero _before_ creating the seq_buf or we
> would crash.  So someone has to check the "untrusted" data somewhere,
> right?
> 
> And why can't we have buffers of 0 size work just fine?  What prevents
> that?  People have "empty" strings for lots of things.

Yeah, okay. I'll not add the WARN for seq_buf_strlen() and remove it
from seq_buf_str().

-Kees

-- 
Kees Cook

Reply via email to