From 64031225b2595620658640c0b7e01311c8b69a06 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Thu, 6 Oct 2011 03:14:21 -0400 Subject: [PATCH] More fallout from OOM in NSS --- ChangeLog | 5 +++++ nss/nsswitch.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 33eeafb..52d4f1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-09-25 Jiri Olsa + + * nss/nsswitch.c (__nss_database_lookup): Handle + nss_parse_service_list out of memory case. + 2011-09-15 Jiri Olsa * nss/nsswitch.c (__nss_lookup_function): Handle __tsearch diff --git a/nss/nsswitch.c b/nss/nsswitch.c index 535d93b..ac73984 100644 --- a/nss/nsswitch.c +++ b/nss/nsswitch.c @@ -147,7 +147,7 @@ __nss_database_lookup (const char *database, const char *alternate_name, __libc_lock_unlock (lock); - return 0; + return *ni != NULL ? 0 : -1; } libc_hidden_def (__nss_database_lookup) -- 2.7.4