diff options
author | Andreas Schneider <asn@samba.org> | 2015-07-14 11:34:45 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-07-15 01:47:20 +0200 |
commit | 0c01771e3b971b1dc35c930a0a77e0a595fdd9a1 (patch) | |
tree | a62a90b46834fa60aa3672de647fa9eaf6a72427 /source4 | |
parent | 7680cf881a7d44e27be46a87d4e7bbf539cf7d77 (diff) | |
download | samba-0c01771e3b971b1dc35c930a0a77e0a595fdd9a1.tar.gz |
CID 1311764: Fix logical compare in if clause
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util_trusts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/common/util_trusts.c b/source4/dsdb/common/util_trusts.c index 0e41803f7c5..943d4379bc9 100644 --- a/source4/dsdb/common/util_trusts.c +++ b/source4/dsdb/common/util_trusts.c @@ -657,7 +657,7 @@ static int dns_cmp(const char *s1, const char *s2) if (i == 0) { p1 = s1; - if (l1 == 0 && l1 >= UINT16_MAX) { + if (l1 == 0 || l1 >= UINT16_MAX) { /* just use one single component on overflow */ break; } @@ -687,7 +687,7 @@ static int dns_cmp(const char *s1, const char *s2) if (i == 0) { p2 = s2; - if (l2 == 0 && l2 >= UINT16_MAX) { + if (l2 == 0 || l2 >= UINT16_MAX) { /* just use one single component on overflow */ break; } |