* [2.28 COMMITTED] nscd: avoid assertion failure during persistent db check
@ 2019-01-01 0:00 Florian Weimer
0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2019-01-01 0:00 UTC (permalink / raw)
To: libc-stable
From: Andreas Schwab <schwab@suse.de>
nscd should not abort when it finds inconsistencies in the persistent db.
(cherry picked from commit 61595e3d36ded374f97961503e843a314b0203c2)
2018-12-19 Andreas Schwab <schwab@suse.de>
* nscd/connections.c (check_use): Don't abort on invalid len.
diff --git a/nscd/connections.c b/nscd/connections.c
index 47fbb9923a..9818200764 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -304,7 +304,8 @@ static int
check_use (const char *data, nscd_ssize_t first_free, uint8_t *usemap,
enum usekey use, ref_t start, size_t len)
{
- assert (len >= 2);
+ if (len < 2)
+ return 0;
if (start > first_free || start + len > first_free
|| (start & BLOCK_ALIGN_M1))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-30 13:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 [2.28 COMMITTED] nscd: avoid assertion failure during persistent db check Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).