summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-12-09 09:21:54 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-12-09 09:21:54 +0000
commit6dd0366a659bc4af1361ffdcec4ac4ee1f27ca03 (patch)
treeee24a59fb74ced4844bc5c8170991ab2b21e8f56 /src
parentfb6fdf5f24ee6921a1ba2651a534887de2e16fbc (diff)
downloads6-rc-6dd0366a659bc4af1361ffdcec4ac4ee1f27ca03.tar.xz
bugfix: s6-rc-bundle incorrectly checked against bundle prefixes
Diffstat (limited to 'src')
-rw-r--r--src/s6-rc/s6-rc-bundle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/s6-rc/s6-rc-bundle.c b/src/s6-rc/s6-rc-bundle.c
index 59d5dfb..4a07804 100644
--- a/src/s6-rc/s6-rc-bundle.c
+++ b/src/s6-rc/s6-rc-bundle.c
@@ -118,9 +118,9 @@ static void modify_resolve (int fdcompiled, s6rc_db_t *db, char const *const *to
cleanup(compiled) ;
strerr_diefu3sys(111, "cdb_read ", compiled, "/resolve.cdb") ;
}
- for (i = 0 ; i < todeln ; i++) if (!strncmp(todel[i], ktmp, klen)) break ;
+ for (i = 0 ; i < todeln ; i++) if (klen == strlen(todel[i]) && !strncmp(todel[i], ktmp, klen)) break ;
if (i < todeln) continue ;
- for (i = 0 ; i < toaddn ; i++) if (!strncmp(toadd[i], ktmp, klen)) break ;
+ for (i = 0 ; i < toaddn ; i++) if (klen == strlen(toadd[i]) && !strncmp(toadd[i], ktmp, klen)) break ;
if (i < toaddn) continue ;
{
uint32_t dlen = cdb_datalen(&cr) ;