* The following bugs are resolved with this release:
- 15946, 16545, 16574, 16623, 16657, 16695, 16743, 16758, 16878, 16882,
- 16885, 16916, 16932, 16943, 16958, 17048, 17062, 17069, 17079, 17137,
- 17153, 17213, 17263, 17269, 17325, 17555, 18007, 18032, 18287.
+ 15946, 16545, 16574, 16623, 16657, 16695, 16743, 16758, 16759, 16878,
+ 16882, 16885, 16916, 16932, 16943, 16958, 17048, 17062, 17069, 17079,
+ 17137, 17153, 17213, 17263, 17269, 17325, 17555, 18007, 18032, 18287.
* A buffer overflow in gethostbyname_r and related functions performing DNS
requests has been fixed. If the NSS functions were called with a
}
#ifdef USE_NSCD
+static const char *
+get_nonempty_val (const char *in)
+{
+ if (*in == '\0')
+ return NULL;
+ return in;
+}
+
static enum nss_status
nscd_getnetgrent (struct __netgrent *datap, char *buffer, size_t buflen,
int *errnop)
return NSS_STATUS_UNAVAIL;
datap->type = triple_val;
- datap->val.triple.host = datap->cursor;
+ datap->val.triple.host = get_nonempty_val (datap->cursor);
datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
- datap->val.triple.user = datap->cursor;
+ datap->val.triple.user = get_nonempty_val (datap->cursor);
datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
- datap->val.triple.domain = datap->cursor;
+ datap->val.triple.domain = get_nonempty_val (datap->cursor);
datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
return NSS_STATUS_SUCCESS;