lib:crypto: Explicitly check for zero
authorJo Sutton <josutton@catalyst.net.nz>
Sun, 7 Jan 2024 20:48:44 +0000 (09:48 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 16 Feb 2024 02:41:36 +0000 (02:41 +0000)
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/crypto/gkdi.c

index f7982491e10359ed83601900e11066fb29d86524..a39a32add822f2d606c000f6abca58a3285a581a 100644 (file)
@@ -71,7 +71,7 @@ static NTSTATUS make_gkdi_context_security_descriptor(
        enum ndr_err_code ndr_err;
        struct GkdiDerivationCtx ctx_with_sd = *ctx;
 
-       if (ctx_with_sd.target_security_descriptor.length) {
+       if (ctx_with_sd.target_security_descriptor.length != 0) {
                return NT_STATUS_INVALID_PARAMETER;
        }