From 445f314614e4e514a70ff5f1fbbfedb4d3ab0aac Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 29 May 2012 15:31:49 +0200 Subject: [PATCH] s3: Fix uninitialized memory read in talloc_free() Thanks to laurent gaffie for reporting this issue! --- source3/libsmb/clispnego.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c index 4581ce40267..0a907ba7197 100644 --- a/source3/libsmb/clispnego.c +++ b/source3/libsmb/clispnego.c @@ -127,6 +127,9 @@ bool spnego_parse_negTokenInit(TALLOC_CTX *ctx, 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 (data->has_error) { + break; + } } OIDs[i] = NULL; asn1_end_tag(data); -- 2.34.1