[Commits] [SCM] claws branch, master, updated. 3.18.0-105-g82bd80a34

wwp at claws-mail.org wwp at claws-mail.org
Sat Sep 11 22:45:09 CEST 2021


The branch, master has been updated
       via  82bd80a3403ef1c7603d3d0148ac371d2c285852 (commit)
      from  ac7ee135c7babde03957ed7da0ee24705173df3d (commit)

Summary of changes:
 src/vcard.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 82bd80a3403ef1c7603d3d0148ac371d2c285852
Author: wwp <subscript at free.fr>
Date:   Sat Sep 11 22:44:31 2021 +0200

    Fix CID 1491382: malloc size too short by one because, worst case, qp_decode_const
    will dump the exact same input string.

diff --git a/src/vcard.c b/src/vcard.c
index 2e8fce511..e7bef946a 100644
--- a/src/vcard.c
+++ b/src/vcard.c
@@ -390,8 +390,8 @@ static gchar *vcard_unescape_qp( gchar *value ) {
 		return NULL;
 		
 	len = strlen(value);
-	res = g_malloc(len);
-	qp_decode_const(res, len-1, value);
+	res = g_malloc(len + 1);
+	qp_decode_const(res, len, value);
 	if (!g_utf8_validate(res, -1, NULL)) {
 		gchar *mybuf = g_malloc(strlen(res)*2 +1);
 		conv_localetodisp(mybuf, strlen(res)*2 +1, res);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list