>Change code in smtp.c and popsbr.c to treat bytes read from the >network as a byte array with a length, and not as a nul-terminated >C string. > >This patch removes a call to strlen, which is always satisfying.
I am officially neutral about this patch, as AFAICT the protocols involved (particularly the SASL exchanges) do not permit a NUL byte in them and such a byte appearing is a syntax error; unlike actual email content I think not handling a syntax error in a network protocol is reasonable. But I can understand the desire to get away from C strings so I lean toward accepting this (I'm fine with the version 2 of your patch you posted). The one exception to the above statement is RFC 5321 does explicitly permit a NUL byte in SMTP in the "ehlo-greeting". Go figure. As far as I can tell this is the only place where it is permitted in SMTP (aside from actual message content). --Ken
