summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient/wbc_idmap.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-07-26 11:01:36 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-09-08 15:09:54 +0200
commit38198e8f3e07351af88db4b931271977e23e13fd (patch)
tree58607dc4f185eb6fe5b4e0cf8c4c99e16560ef04 /nsswitch/libwbclient/wbc_idmap.c
parent2ff88386d503390ba5beeeb98ad7992c5e8fd0d5 (diff)
downloadsamba-38198e8f3e07351af88db4b931271977e23e13fd.tar.gz
nsswitch: make the wbcSidsToUnixIds() parser more robust
this allows it to handle new types of responses Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'nsswitch/libwbclient/wbc_idmap.c')
-rw-r--r--nsswitch/libwbclient/wbc_idmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nsswitch/libwbclient/wbc_idmap.c b/nsswitch/libwbclient/wbc_idmap.c
index ad3cfe67709..5325dbe5ce5 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;