diff options
-rw-r--r-- | source3/libsmb/clispnego.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c index 4581ce4026..d584f9f4ab 100644 --- a/source3/libsmb/clispnego.c +++ b/source3/libsmb/clispnego.c @@ -126,7 +126,12 @@ bool spnego_parse_negTokenInit(TALLOC_CTX *ctx, asn1_start_tag(data,ASN1_CONTEXT(0)); asn1_start_tag(data,ASN1_SEQUENCE(0)); for (i=0; asn1_tag_remaining(data) > 0 && i < ASN1_MAX_OIDS-1; i++) { - asn1_read_OID(data,ctx, &OIDs[i]); + if (!asn1_read_OID(data,ctx, &OIDs[i])) { + break; + } + if (data->has_error) { + break; + } } OIDs[i] = NULL; asn1_end_tag(data); |