libcli/auth: let spnego_write_mech_types() check the asn1_load() return
authorStefan Metzmacher <metze@samba.org>
Wed, 1 Dec 2010 23:40:01 +0000 (00:40 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Dec 2010 17:23:41 +0000 (18:23 +0100)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Dec  7 18:23:41 CET 2010 on sn-devel-104

libcli/auth/spnego_parse.c

index 86b083d805c73c8203e28dc856121ab8c33d8650..27ede1bde4783144252f3cba172dbaf7b7241d5d 100644 (file)
@@ -380,6 +380,10 @@ bool spnego_write_mech_types(TALLOC_CTX *mem_ctx,
 {
        struct asn1_data *asn1 = asn1_init(mem_ctx);
 
+       if (asn1 == NULL) {
+               return false;
+       }
+
        /* Write mechTypes */
        if (mech_types && *mech_types) {
                int i;