BZ#14498: fix infinite loop in nss_db_getservbyname
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 21 Nov 2014 05:29:56 +0000 (03:29 -0200)
committerAlexandre Oliva <aoliva@redhat.com>
Fri, 21 Nov 2014 05:29:56 +0000 (03:29 -0200)
commit4969890247d7d6a548f17641ed5a18f4b713d211
tree26eeb456373435508696552d794f926f02f74701
parent81959214868c9ac9e425fbf0fa3fd9135e207f7e
BZ#14498: fix infinite loop in nss_db_getservbyname

nss_db uses nss_files code for services, but a continue on protocol
mismatch that doesn't affect nss_files skipped the code that advanced
to the next db entry.  Any one of these changes would suffice to fix
it, but fixing both makes them both safer to reuse elsewhere.

for  ChangeLog

[BZ #14498]
* NEWS: Fixed.
* nss/nss_db/db-XXX.c (_nss_db_get##name##_r): Update hidx
after parsing line but before break_if_match.
* nss/nss_files/files-service (DB_LOOKUP): Don't "continue;"
if there is a protocol mismatch.
ChangeLog
NEWS
nss/nss_db/db-XXX.c
nss/nss_files/files-service.c