SHA256
1
0
forked from pool/gnutls
gnutls/gnutls-fix-crash-on-strcat.patch
2011-10-18 12:08:55 +00:00

28 lines
727 B
Diff

From 7043a8e9e314b0c2eb7ac5c2278a0b103f6a758a Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@gnome.org>
Date: Mon, 17 Oct 2011 15:15:46 +0200
Subject: [PATCH] Correctly terminate a string with \0 before concatenating to
it
Fix a potential crash:
https://bugzilla.novell.com/show_bug.cgi?id=724421
---
lib/x509/common.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/x509/common.c b/lib/x509/common.c
index 6bb4746..0651d2e 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -390,6 +390,7 @@ _gnutls_x509_data2hex (const opaque * data, size_t data_size,
if (out)
{
out[0] = '#';
+ out[1] = '\0';
_gnutls_str_cat (out, *sizeof_out, res);
}
--
1.7.7