Codebase list cyrus-sasl2 / 24023e29-996c-4a9c-9d53-7ff07cb55caf/main debian / patches / 0034-CVE-2019-19906.patch
24023e29-996c-4a9c-9d53-7ff07cb55caf/main

Tree @24023e29-996c-4a9c-9d53-7ff07cb55caf/main (Download .tar.gz)

0034-CVE-2019-19906.patch @24023e29-996c-4a9c-9d53-7ff07cb55caf/mainraw · history · blame

Description: CVE-2019-19906: Off-by-one in _sasl_add_string function
Origin: vendor
Bug: https://github.com/cyrusimap/cyrus-sasl/issues/587
Bug-Debian: https://bugs.debian.org/947043
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2019-19906
Author: Stephan Zeisberg <stephan@srlabs.de>
Reviewed-by: Salvatore Bonaccorso <carnil@debian.org>
Last-Update: 2019-12-19

--- a/lib/common.c
+++ b/lib/common.c
@@ -190,7 +190,7 @@ int _sasl_add_string(char **out, size_t
 
   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;