HEIMDAL:kdc: fix dh->q allocation check in get_dh_param()
authorStefan Metzmacher <metze@samba.org>
Tue, 29 Aug 2017 05:24:35 +0000 (07:24 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 6 Dec 2017 18:06:21 +0000 (19:06 +0100)
Thanks to Doug Nazar <nazard@nazar.ca> for spotting this!

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12986

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from heimdal commit a79b59ba27070a015479e8d981b7e685dbe34310)
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/heimdal/kdc/pkinit.c

index c874847cffde642552cb9dc04319c6592c4edfb9..ad7f3efc10a77bfa6ee160e0fe61919291977ff6 100644 (file)
@@ -384,7 +384,7 @@ get_dh_param(krb5_context context,
 
     if (dhparam.q) {
        dh->q = integer_to_BN(context, "DH p-1 factor", dhparam.q);
-       if (dh->g == NULL)
+       if (dh->q == NULL)
            goto out;
     }