libcli/auth: make netlogon_creds_crypt_samlogon_validation more robust
authorStefan Metzmacher <metze@samba.org>
Wed, 24 Apr 2013 10:36:04 +0000 (12:36 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 5 Aug 2013 08:30:01 +0000 (10:30 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
libcli/auth/credentials.c

index fb77ede197a3b9c27a6c7d0273832d1184f9caf1..5c8b25b7a4260ac185fc298d6d3c53e9171a70c2 100644 (file)
@@ -493,8 +493,12 @@ static void netlogon_creds_crypt_samlogon_validation(struct netlogon_creds_Crede
                                                     bool encrypt)
 {
        static const char zeros[16];
-
        struct netr_SamBaseInfo *base = NULL;
+
+       if (validation == NULL) {
+               return;
+       }
+
        switch (validation_level) {
        case 2:
                if (validation->sam2) {