On Tue, Feb 11, 2020 at 12:18 PM Jeff King <peff@xxxxxxxx> wrote: > We read each header line into a strbuf, which means that we could > in theory handle header values with embedded NUL bytes. But in practice, > the values we parse out are passed to decode_header(), which uses > strstr(), strchr(), etc. And we would not expect such bytes anyway; they > are forbidden by RFC822, etc and any non-ASCII characters should be s/etc/etc./ > encoded with RFC2047 encoding. > > So let's switch to using strbuf_addstr(), which saves us some length > computations (and will enable further cleanups in this code). > > Signed-off-by: Jeff King <peff@xxxxxxxx>