]> git.ipfire.org Git - thirdparty/glibc.git/commit
nss_db: Fix initialization of iteration position [BZ #20237]
authorFlorian Weimer <fweimer@redhat.com>
Sat, 11 Jun 2016 10:12:56 +0000 (12:12 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 18 Aug 2016 11:02:45 +0000 (13:02 +0200)
commit79ad3fa2b1f38997be255d4eb709da928b66796a
treeccc5a5003a55ab1a44ab9c698495d0a8e0572f91
parent395b1b9cbfda75fcdef0a9654d7ef6bf8bf7db11
nss_db: Fix initialization of iteration position [BZ #20237]

When get*ent is called without a preceding set*ent, we need
to set the initial iteration position in get*ent.

Reproducer: Add “services: db files” to /etc/nsswitch.conf, then run
“perl -e getservent”.  It will segfault before this change, and exit
silently after it.

(cherry picked from commit 31d0a4fa646db8b8c97ce24e0ec0a7b73de4fca1)
ChangeLog
nss/nss_db/db-XXX.c