bdc76f
commit 61595e3d36ded374f97961503e843a314b0203c2
bdc76f
Author: Andreas Schwab <schwab@suse.de>
bdc76f
Date:   Tue May 15 14:42:37 2018 +0200
bdc76f
bdc76f
    nscd: avoid assertion failure during persistent db check
bdc76f
    
bdc76f
    nscd should not abort when it finds inconsistencies in the persistent db.
bdc76f
bdc76f
diff --git a/nscd/connections.c b/nscd/connections.c
bdc76f
index 47fbb9923aa2aac7..98182007646a33d5 100644
bdc76f
--- a/nscd/connections.c
bdc76f
+++ b/nscd/connections.c
bdc76f
@@ -304,7 +304,8 @@ static int
bdc76f
 check_use (const char *data, nscd_ssize_t first_free, uint8_t *usemap,
bdc76f
 	   enum usekey use, ref_t start, size_t len)
bdc76f
 {
bdc76f
-  assert (len >= 2);
bdc76f
+  if (len < 2)
bdc76f
+    return 0;
bdc76f
 
bdc76f
   if (start > first_free || start + len > first_free
bdc76f
       || (start & BLOCK_ALIGN_M1))