mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
auth: gensec: asn1 fixes - check all returns.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
parent
f102752b0c
commit
4dba8fd599
@ -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)
|
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);
|
struct asn1_data *data = asn1_init(NULL);
|
||||||
|
|
||||||
if (!data) return false;
|
if (!data) return false;
|
||||||
|
|
||||||
asn1_load(data, *blob);
|
if (!asn1_load(data, *blob)) goto err;
|
||||||
asn1_start_tag(data, ASN1_APPLICATION(0));
|
if (!asn1_start_tag(data, ASN1_APPLICATION(0))) goto err;
|
||||||
asn1_check_OID(data, oid);
|
if (!asn1_check_OID(data, oid)) goto err;
|
||||||
|
|
||||||
ret = !data->has_error;
|
ret = !data->has_error;
|
||||||
|
|
||||||
asn1_free(data);
|
err:
|
||||||
|
|
||||||
|
asn1_free(data);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user