[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-105-g03d781d9f

wwp at claws-mail.org wwp at claws-mail.org
Fri Sep 3 06:48:06 UTC 2021


The branch, gtk3 has been updated
       via  03d781d9fb4fba7b33b40293723fb3f7df40f017 (commit)
      from  91f5bbf35b85f5a39a4d9e65318ca643eef18e2c (commit)

Summary of changes:
 src/plugins/mailmbox/mailimf_write.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 03d781d9fb4fba7b33b40293723fb3f7df40f017
Author: wwp <subscript at free.fr>
Date:   Fri Sep 3 08:21:46 2021 +0200

    CID1440022: check for claws_fputc return value.

diff --git a/src/plugins/mailmbox/mailimf_write.c b/src/plugins/mailmbox/mailimf_write.c
index cb5b9532c..816a972d6 100644
--- a/src/plugins/mailmbox/mailimf_write.c
+++ b/src/plugins/mailmbox/mailimf_write.c
@@ -1374,29 +1374,31 @@ int mailimf_quoted_string_write(FILE * f, int * col,
   int r;
   size_t i;
 
-  claws_fputc('\"', f);
+  if (claws_fputc('\"', f) < 0)
+    return MAILIMF_ERROR_FILE;
   for(i = 0 ; i < len ; i ++) {
     switch (string[i]) {
     case '\\':
     case '\"':
       r = claws_fputc('\\', f);
       if (r < 0)
-	return MAILIMF_ERROR_FILE;
+        return MAILIMF_ERROR_FILE;
       r = claws_fputc(string[i], f);
       if (r < 0)
-	return MAILIMF_ERROR_FILE;
+         return MAILIMF_ERROR_FILE;
       (* col) += 2;
       break;
 
     default:
       r = claws_fputc(string[i], f);
       if (r < 0)
-	return MAILIMF_ERROR_FILE;
+        return MAILIMF_ERROR_FILE;
       (* col) ++;
       break;
     }
   }
-  claws_fputc('\"', f);
+  if (claws_fputc('\"', f) < 0)
+    return MAILIMF_ERROR_FILE;
 
   return MAILIMF_NO_ERROR;
 }

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list