diff options
author | Volker Lendecke <vl@samba.org> | 2018-08-08 10:08:38 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-08-23 10:38:28 +0200 |
commit | b1b882c2c459b206e2455f53b3926ff9a13f7335 (patch) | |
tree | 83fb66b799a706877e716f581dc1eb0ee137478f | |
parent | d4e8fd5fd246a80e1a13a2bf3965d0335d4dc2c4 (diff) | |
download | samba-b1b882c2c459b206e2455f53b3926ff9a13f7335.tar.gz |
libsmb: Fix CID 1438244 Unsigned compared against 0
ndr_size_dom_sid returns a size_t, so that can't be <0. Also, the only
case that ndr_size_dom_sid returns 0 is a NULL sid
pointer. ndr_size_dom_sid can reasonably be assumed to not overflow, the
number of sub-auths is a uint8. That times 4 plus 8 always fits into a
size_t.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/libsmb/cli_smb2_fnum.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index 26079a02eca..561efe371a4 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -2948,10 +2948,6 @@ NTSTATUS cli_smb2_get_user_quota(struct cli_state *cli, sid_len = ndr_size_dom_sid(&pqt->sid, 0); query.return_single = 1; - if (sid_len < 0) { - status = NT_STATUS_INVALID_PARAMETER; - goto fail; - } info.next_entry_offset = 0; info.sid_length = sid_len; |