On Wed, May 24, 2023 at 01:02:36PM -0400, Kenny Ho wrote:The expected buffer is a NUL terminated c-string.
On Wed, May 24, 2023 at 12:02 PM Andrew Lunn <andrew@xxxxxxx> wrote:The quoted text said 'string'. It is not clear if that means c-string,
So the compiler warning/error needs to be fixed a different want.Understood. Would caping the length at iov_len with a ternary be sufficient?
with a trailing \0. If you just cap iov_len you could end up with a
string which is not terminated.
The other end of the socket should not blow up, because that would be
an obvious DOS or buffer overwrite attack vector.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature