From 7046a1e4f9a51003030ae60f3e8400d0222ddc45 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 4 Jun 2012 12:22:21 -0700 Subject: [PATCH] s3: Fix uninitialized memory read in talloc_free() Thanks to laurent gaffie for reporting this issue! (cherry picked from commit bc4a2c143b531f9362acb8f3d6e099cbac070840) --- source3/libsmb/clispnego.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c index 36d21d0a965..33225290f9e 100644 --- a/source3/libsmb/clispnego.c +++ b/source3/libsmb/clispnego.c @@ -161,6 +161,9 @@ bool spnego_parse_negTokenInit(DATA_BLOB blob, for (i=0; asn1_tag_remaining(data) > 0 && i < ASN1_MAX_OIDS-1; i++) { const char *oid_str = NULL; asn1_read_OID(data,talloc_autofree_context(),&oid_str); + if (data->has_error) { + break; + } OIDs[i] = CONST_DISCARD(char *, oid_str); } OIDs[i] = NULL; -- 2.11.4.GIT