=================================================================== RCS file: /cvs/mandoc/mandocdb.c,v retrieving revision 1.184 retrieving revision 1.186 diff -u -p -r1.184 -r1.186 --- mandoc/mandocdb.c 2015/01/21 22:41:49 1.184 +++ mandoc/mandocdb.c 2015/03/13 00:19:41 1.186 @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.184 2015/01/21 22:41:49 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.186 2015/03/13 00:19:41 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -672,7 +672,8 @@ treescan(void) say(path, "Skip pdf"); continue; } else if ( ! use_all && - ((FORM_SRC == dform && strcmp(fsec, dsec)) || + ((FORM_SRC == dform && + strncmp(fsec, dsec, strlen(dsec))) || (FORM_CAT == dform && strcmp(fsec, "0")))) { if (warnings) say(path, "Wrong filename suffix"); @@ -941,6 +942,7 @@ mlink_add(struct mlink *mlink, const struct stat *st) assert(NULL == ohash_find(&mlinks, slot)); ohash_insert(&mlinks, slot, mlink); + memset(&inodev, 0, sizeof(inodev)); /* Clear padding. */ inodev.st_ino = st->st_ino; inodev.st_dev = st->st_dev; slot = ohash_lookup_memory(&mpages, (char *)&inodev,