Re: [PATCH] xheader: fix lookup of .-suffixed keyword

2023-07-18 Thread alice
On Tue Jul 18, 2023 at 5:21 PM UTC, Sergey Poznyakoff wrote: > psykose 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); > > -

Re: [PATCH] xheader: fix lookup of .-suffixed keyword

2023-07-18 Thread Sergey Poznyakoff
psykose 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] == '.')

[PATCH] xheader: fix lookup of .-suffixed keyword

2023-07-18 Thread psykose
str[strlen(str)] returns the NUL byte, not the last character. fixes a339f05cd269013fa133d2f148d73f6f7d4247e4 --- src/xheader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xheader.c b/src/xheader.c index 1347ce18..52060a26 100644 --- a/src/xheader.c +++ b/src/xheader.c