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
@@ -561,7 +561,7 @@ locate_handler (char const *keyword)
     if (p->prefix)
       {
        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] == 
'.')
           return p;
       }
     else
-- 
2.41.0


Reply via email to