summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-10 16:55:46 +0200
committerVolker Lendecke <vl@samba.org>2010-04-10 17:05:38 +0200
commit4085e189a147841fed64ecbe072cde007cedad0d (patch)
tree4da68029d8e0561b2ece7c02534dab39824e158c /source3/winbindd
parent77267733edba42f03f89f3777854569bf2333321 (diff)
downloadsamba-4085e189a147841fed64ecbe072cde007cedad0d.tar.gz
samba-4085e189a147841fed64ecbe072cde007cedad0d.tar.bz2
samba-4085e189a147841fed64ecbe072cde007cedad0d.zip
s3: Check 0 termination in GETALIASES
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_getsidaliases.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/winbindd/winbindd_getsidaliases.c b/source3/winbindd/winbindd_getsidaliases.c
index 6755fa149f..baa8fea11e 100644
--- a/source3/winbindd/winbindd_getsidaliases.c
+++ b/source3/winbindd/winbindd_getsidaliases.c
@@ -68,13 +68,19 @@ struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
num_sids = 0;
sids = NULL;
- if ((request->extra_data.data != NULL)
- && !parse_sidlist(state, request->extra_data.data,
- &sids, &num_sids)) {
- DEBUG(1, ("Could not parse SID list: %s\n",
- request->extra_data.data));
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
+ if (request->extra_data.data != NULL) {
+ if (request->extra_data.data[request->extra_len-1] != '\0') {
+ DEBUG(1, ("Got non-NULL terminated sidlist\n"));
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ return tevent_req_post(req, ev);
+ }
+ if (!parse_sidlist(state, request->extra_data.data,
+ &sids, &num_sids)) {
+ DEBUG(1, ("Could not parse SID list: %s\n",
+ request->extra_data.data));
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ return tevent_req_post(req, ev);
+ }
}
subreq = wb_lookupuseraliases_send(state, ev, domain, num_sids, sids);