diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-07-26 11:01:36 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-09-08 15:09:54 +0200 |
commit | 38198e8f3e07351af88db4b931271977e23e13fd (patch) | |
tree | 58607dc4f185eb6fe5b4e0cf8c4c99e16560ef04 | |
parent | 2ff88386d503390ba5beeeb98ad7992c5e8fd0d5 (diff) | |
download | samba-38198e8f3e07351af88db4b931271977e23e13fd.tar.gz samba-38198e8f3e07351af88db4b931271977e23e13fd.tar.bz2 samba-38198e8f3e07351af88db4b931271977e23e13fd.zip |
nsswitch: make the wbcSidsToUnixIds() parser more robust
this allows it to handle new types of responses
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | nsswitch/libwbclient/wbc_idmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nsswitch/libwbclient/wbc_idmap.c b/nsswitch/libwbclient/wbc_idmap.c index ad3cfe6770..5325dbe5ce 100644 --- a/nsswitch/libwbclient/wbc_idmap.c +++ b/nsswitch/libwbclient/wbc_idmap.c @@ -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; |