Message ID | 20161221224528.20096-1-rth@twiddle.net |
---|---|
State | New |
Headers | show |
On Wed, 21 Dec 2016, Richard Henderson wrote: > I think the patch is fairly obvious: return error if there is no > name as opposed to if there isn't. I've taken this statement of obviousness as consensus to commit my (identical) patch <https://sourceware.org/ml/libc-alpha/2016-12/msg00771.html>. Bug 20987 remains open for the various apparently unbounded stack allocations for NIS+.
diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c index 7f698b4..cb5acce 100644 --- a/nis/nss_nisplus/nisplus-alias.c +++ b/nis/nss_nisplus/nisplus-alias.c @@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, return status; } - if (name != NULL) + if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL;