From 053973023ba8786f490f77372a860edcb691277a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 11 May 2021 13:56:39 +0000 Subject: bugfix: possible oob read in s6-rc-compile --- src/s6-rc/s6-rc-compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c index 66f886e..7aa37ea 100644 --- a/src/s6-rc/s6-rc-compile.c +++ b/src/s6-rc/s6-rc-compile.c @@ -220,7 +220,7 @@ static int add_name_nocheck (before_t *be, char const *srcdir, char const *name, static void check_identifier (char const *srcdir, char const *s) { - if (!memcmp(s, "s6rc-", 5) && !memcmp(s, "s6-rc-", 6)) + if (!strncmp(s, "s6rc-", 5) && !strncmp(s, "s6-rc-", 6)) strerr_dief5x(1, "in ", srcdir, ": identifier ", s, " starts with reserved prefix") ; } -- cgit v1.2.3