Re: [PATCH 1/4] mailinfo: treat header values as C strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux