1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

nsswitch: make the wbcSidsToUnixIds() parser more robust

this allows it to handle new types of responses

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andrew Tridgell 2011-07-26 11:01:36 +10:00 committed by Andrew Bartlett
parent 2ff88386d5
commit 38198e8f3e

View File

@ -372,10 +372,10 @@ wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids,
break;
default:
id->type = WBC_ID_TYPE_NOT_SPECIFIED;
q = p;
q = strchr(p, '\n');
break;
};
if (q[0] != '\n') {
if (q == NULL || q[0] != '\n') {
goto wbc_err_invalid;
}
p = q+1;