sbonazzo / rpms / cyrus-sasl

Forked from rpms/cyrus-sasl 2 years ago
Clone

Blame SOURCES/cyrus-sasl-2.1.27-CVE-2019-19906.patch

df6e3e
From bcb6c06ec17728f7c9c492dc257b1e541a6830da Mon Sep 17 00:00:00 2001
df6e3e
From: Simo Sorce <simo@redhat.com>
df6e3e
Date: Tue, 5 May 2020 14:41:06 -0400
df6e3e
Subject: [PATCH] CVE-2019-19906
df6e3e
df6e3e
Backport of commit id:
df6e3e
dcc9f51cbd4ed622cfb0f9b1c141eb2ffe3b12f1
df6e3e
df6e3e
Signed-off-by: Simo Sorce <simo@redhat.com>
df6e3e
---
df6e3e
 lib/common.c | 2 +-
df6e3e
 1 file changed, 1 insertion(+), 1 deletion(-)
df6e3e
df6e3e
diff --git a/lib/common.c b/lib/common.c
df6e3e
index bc3bf1d..9969d6a 100644
df6e3e
--- a/lib/common.c
df6e3e
+++ b/lib/common.c
df6e3e
@@ -190,7 +190,7 @@ int _sasl_add_string(char **out, size_t *alloclen,
df6e3e
 
df6e3e
   if (add==NULL) add = "(null)";
df6e3e
 
df6e3e
-  addlen=strlen(add); /* only compute once */
df6e3e
+  addlen=strlen(add)+1; /* only compute once */
df6e3e
   if (_buf_alloc(out, alloclen, (*outlen)+addlen)!=SASL_OK)
df6e3e
     return SASL_NOMEM;
df6e3e
 
df6e3e
-- 
df6e3e
2.18.2
df6e3e