public inbox for
 help / color / mirror / Atom feed
* [COMMITTED 2.35] nss: add assert to DB_LOOKUP_FCT (BZ #28752)
@ 2022-06-14  3:00 DJ Delorie
  0 siblings, 0 replies; only message in thread
From: DJ Delorie @ 2022-06-14  3:00 UTC (permalink / raw)
  To: libc-stable

It's interesting if we have a null action list,
so an assert is worthwhile.

Suggested-by: DJ Delorie <>
Signed-off-by: Sam James <>
Reviewed-by: DJ Delorie <>
(cherry picked from commit 3fdf0a205b622e40fa7e3c4ed1e4ed4d5c6c5380)

diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
index db95937674..bfc57b8e64 100644
--- a/nss/XXX-lookup.c
+++ b/nss/XXX-lookup.c
@@ -15,6 +15,7 @@
    License along with the GNU C Library; if not, see
    <>.  */
+#include <assert.h>
 #include "nsswitch.h"
@@ -54,6 +55,10 @@ DB_LOOKUP_FCT (nss_action_list *ni, const char *fct_name, const char *fct2_name,
+  /* We want to know about it if we've somehow got a NULL action list;
+   in the past, we had bad state if seccomp interfered with setup. */
+  assert(*ni != NULL);
   return __nss_lookup (ni, fct_name, fct2_name, fctp);
 libc_hidden_def (DB_LOOKUP_FCT)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-14  3:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14  3:00 [COMMITTED 2.35] nss: add assert to DB_LOOKUP_FCT (BZ #28752) DJ Delorie

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).