[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-158-g121dfea85

wwp at claws-mail.org wwp at claws-mail.org
Sat Sep 11 22:44:38 CEST 2021


The branch, gtk3 has been updated
       via  121dfea858507a89683c16ed417e0ac185fd16a6 (commit)
      from  66893572a7e7cd2421509f7ed9ebc396a73bd523 (commit)

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


- Log -----------------------------------------------------------------
commit 121dfea858507a89683c16ed417e0ac185fd16a6
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