aboutsummaryrefslogtreecommitdiffstats
path: root/main/cyrus-sasl/CVE-2019-19906.patch
blob: f7edb521e89f363d6cf9afa0aada2648e71bbccb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
https://github.com/cyrusimap/cyrus-sasl/issues/587

diff --git a/lib/common.c b/lib/common.c
index bc3bf1df..9969d6aa 100644
--- a/lib/common.c
+++ b/lib/common.c
@@ -190,7 +190,7 @@ int _sasl_add_string(char **out, size_t *alloclen,

   if (add==NULL) add = "(null)";

-  addlen=strlen(add); /* only compute once */
+  addlen=strlen(add)+1; /* only compute once */
   if (_buf_alloc(out, alloclen, (*outlen)+addlen)!=SASL_OK)
     return SASL_NOMEM;