Index: lib/libc/gen/fts.c =================================================================== --- lib/libc/gen/fts.c (revision 280791) +++ lib/libc/gen/fts.c (working copy) @@ -1156,6 +1156,9 @@ struct _fts_private *priv; const char **cpp; + if (ent->fts_nlink >= LINK_MAX) + return (0); + priv = (struct _fts_private *)sp; /* * If this node's device is different from the previous, grab