diff options
author | Jeremy Allison <jra@samba.org> | 2014-09-19 12:41:22 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-09-26 00:51:16 +0200 |
commit | 4dba8fd59982e5459c4275aaf434f6d564fcf79d (patch) | |
tree | 5305000f1d36abc02bcfa2e9e4d7b13cb04ce641 /auth/gensec/gensec_util.c | |
parent | f102752b0ccc39d8fdef6a85485dc0b44d16a860 (diff) | |
download | samba-4dba8fd59982e5459c4275aaf434f6d564fcf79d.tar.gz |
auth: gensec: asn1 fixes - check all returns.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Diffstat (limited to 'auth/gensec/gensec_util.c')
-rw-r--r-- | auth/gensec/gensec_util.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/auth/gensec/gensec_util.c b/auth/gensec/gensec_util.c index 568128add15..b8e38b7f7c9 100644 --- a/auth/gensec/gensec_util.c +++ b/auth/gensec/gensec_util.c @@ -188,19 +188,20 @@ NTSTATUS gensec_packet_full_request(struct gensec_security *gensec_security, */ static bool gensec_gssapi_check_oid(const DATA_BLOB *blob, const char *oid) { - bool ret; + bool ret = false; struct asn1_data *data = asn1_init(NULL); if (!data) return false; - asn1_load(data, *blob); - asn1_start_tag(data, ASN1_APPLICATION(0)); - asn1_check_OID(data, oid); + if (!asn1_load(data, *blob)) goto err; + if (!asn1_start_tag(data, ASN1_APPLICATION(0))) goto err; + if (!asn1_check_OID(data, oid)) goto err; ret = !data->has_error; - asn1_free(data); + err: + asn1_free(data); return ret; } |