[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xheader: fix lookup of .-suffixed keyword
From: |
Sergey Poznyakoff |
Subject: |
Re: [PATCH] xheader: fix lookup of .-suffixed keyword |
Date: |
Tue, 18 Jul 2023 19:21:14 +0200 |
User-agent: |
MH (GNU Mailutils 3.15) |
psykose <alice@ayaya.dev> ha escrit:
> str[strlen(str)] returns the NUL byte, not the last character.
That's irrelevant. kwlen below is *not* the length of keyword, but
that of p->keyword:
> size_t kwlen = strlen (p->keyword);
> - if (strncmp (p->keyword, keyword, kwlen) == 0 && keyword[kwlen] == '.')
> + if (strncmp (p->keyword, keyword, kwlen) == 0 && keyword[kwlen - 1] ==
> '.')
That patch actually breaks the functionality, instead of fixing it.
Regards,
Sergey