From 92db75b4a25823cf6882681267418a71d3cdb8c9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 13 Jun 2006 18:15:03 +0000 Subject: r16202: Fix Klocwork #3. Strange - was already fixed in HEAD. Jeremy. (This used to be commit 319f80bbf0455cfaf80eab51313a56db4ed04ac5) --- source3/libsmb/asn1.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c index 072fd30283..86a2845192 100644 --- a/source3/libsmb/asn1.c +++ b/source3/libsmb/asn1.c @@ -268,17 +268,22 @@ BOOL asn1_start_tag(ASN1_DATA *data, uint8 tag) } if (!asn1_read_uint8(data, &b)) { + SAFE_FREE(nesting); return False; } if (b & 0x80) { int n = b & 0x7f; - if (!asn1_read_uint8(data, &b)) + if (!asn1_read_uint8(data, &b)) { + SAFE_FREE(nesting); return False; + } nesting->taglen = b; while (n > 1) { - if (!asn1_read_uint8(data, &b)) + if (!asn1_read_uint8(data, &b)) { + SAFE_FREE(nesting); return False; + } nesting->taglen = (nesting->taglen << 8) | b; n--; } -- cgit