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);
> > -
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] == '.')
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