summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-01-27 17:04:32 +0100
committerArthur de Jong <arthur@arthurdejong.org>2014-03-02 22:33:14 +0100
commit8532f402ae3316fde351c87d96824b765526a026 (patch)
tree123f3ca0ad0d75b00161e51bb252afe336f7d82d
parent4211961e35501ef89b2897dd1e633f2a983447a7 (diff)
Fix crash when retrieving large networks entries
If NSS_STATUS_TRYAGAIN is returned from read_one_hostent or read_one_netent then fp will be closed and function tio_skipall will be called with NULL pointer. It could happend in functions: _nss_ldap_getnetbyname_r _nss_ldap_getnetbyaddr_r _nss_ldap_gethostbyname2_r _nss_ldap_gethostbyaddr_r Fixes r548 (aka afd5d9b).
-rw-r--r--nss/hosts.c2
-rw-r--r--nss/networks.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/nss/hosts.c b/nss/hosts.c
index 7773895..eda739b 100644
--- a/nss/hosts.c
+++ b/nss/hosts.c
@@ -51,8 +51,6 @@
#undef ERROR_OUT_BUFERROR
#define ERROR_OUT_BUFERROR(fp) \
- (void)tio_close(fp); \
- fp = NULL; \
*errnop = ERANGE; \
*h_errnop = TRY_AGAIN; \
return NSS_STATUS_TRYAGAIN;
diff --git a/nss/networks.c b/nss/networks.c
index 6d12ca6..b18d5ca 100644
--- a/nss/networks.c
+++ b/nss/networks.c
@@ -51,8 +51,6 @@
#undef ERROR_OUT_BUFERROR
#define ERROR_OUT_BUFERROR(fp) \
- (void)tio_close(fp); \
- fp = NULL; \
*errnop = ERANGE; \
*h_errnop = TRY_AGAIN; \
return NSS_STATUS_TRYAGAIN;