Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.2:Update
nss-myhostname
0001-avoid-assertion-if-invalid-address-familil...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-avoid-assertion-if-invalid-address-familily-is-passed.diff of Package nss-myhostname
From 744bb07b800cb15f5a175a0be720b478bc429e0a Mon Sep 17 00:00:00 2001 From: Ludwig Nussel <ludwig.nussel@suse.de> Date: Mon, 26 Nov 2012 09:49:42 +0100 Subject: [PATCH nss-myhostname] avoid assertion if invalid address familily is passed to gethostbyaddr_r (bnc#791101) --- nss-myhostname.c | 11 ++++++----- 1 Datei geändert, 6 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-) Index: nss-myhostname-0.3/nss-myhostname.c =================================================================== --- nss-myhostname-0.3.orig/nss-myhostname.c +++ nss-myhostname-0.3/nss-myhostname.c @@ -381,6 +381,12 @@ enum nss_status _nss_myhostname_gethostb struct address *addresses = NULL, *a; unsigned n_addresses = 0, n; + if (af != AF_INET && af != AF_INET6) { + *errnop = EAFNOSUPPORT; + *h_errnop = NO_DATA; + return NSS_STATUS_UNAVAIL; + } + if (len != PROTO_ADDRESS_SIZE(af)) { *errnop = EINVAL; *h_errnop = NO_RECOVERY; @@ -396,11 +402,6 @@ enum nss_status _nss_myhostname_gethostb if (memcmp(addr, LOCALADDRESS_IPV6, 16) == 0) goto found; - - } else { - *errnop = EAFNOSUPPORT; - *h_errnop = NO_DATA; - return NSS_STATUS_UNAVAIL; } netlink_acquire_addresses(&addresses, &n_addresses);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor