summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnutls/gnutls/CVE-2015-6251.patch
blob: 5a29a9671efd79a0e180a118eb7a1472a384bb3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 272854367efc130fbd4f1a51840d80c630214e12 Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Date: Mon, 20 Jul 2015 21:49:28 +0200
Subject: [PATCH] Reset the output value on error in _gnutls_x509_dn_to_string()

Fixes CVE-2015-6251.
Upstream-Status: Backport

Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
---
 lib/x509/common.c | 1 +
 1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/lib/x509/common.c b/lib/x509/common.c
index 94b6bbc..9a4b96f 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -469,6 +469,7 @@ _gnutls_x509_dn_to_string(const char *oid, void *value,
 		if (ret < 0) {
 			gnutls_assert();
 			gnutls_free(str->data);
+			str->data = NULL;
 			return ret;
 		}
 		str->size = size;
--
libgit2 0.23.4