[Commits] [SCM] claws branch, master, updated. 3.10.1-91-gcf60d02

Colin colin at claws-mail.org
Fri Jun 20 12:39:16 CEST 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  cf60d029921a8cf9f5a7775c79afc1acaa0d6f7a (commit)
       via  eadad58d2b3181f88c258e9c6c00b8f705503625 (commit)
      from  a1afbcac11d130e9fe7742a8907d60df8b82e7ee (commit)

Summary of changes:
 src/crash.c                     |   18 ++++++++++++------
 src/plugins/mailmbox/mailmbox.c |    4 +++-
 2 files changed, 15 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit cf60d029921a8cf9f5a7775c79afc1acaa0d6f7a
Author: Colin Leroy <colin at colino.net>
Date:   Fri Jun 20 12:38:55 2014 +0200

    Fix unchecked return value - Patch by Christian Hesse

diff --git a/src/plugins/mailmbox/mailmbox.c b/src/plugins/mailmbox/mailmbox.c
index 48a7a68..500d026 100644
--- a/src/plugins/mailmbox/mailmbox.c
+++ b/src/plugins/mailmbox/mailmbox.c
@@ -676,7 +676,9 @@ claws_mailmbox_append_message_list_no_lock(struct claws_mailmbox_folder * folder
   r = claws_mailmbox_map(folder);
   if (r < 0) {
     debug_print("claws_mailmbox_map failed with %d\n", r);
-    ftruncate(folder->mb_fd, old_size);
+    r = ftruncate(folder->mb_fd, old_size);
+    if (r < 0)
+      debug_print("ftruncate failed with %d\n", r);
     return MAILMBOX_ERROR_FILE;
   }
 

commit eadad58d2b3181f88c258e9c6c00b8f705503625
Author: Colin Leroy <colin at colino.net>
Date:   Fri Jun 20 12:38:28 2014 +0200

    Fix unchecked return values - patch by Christian Hesse

diff --git a/src/crash.c b/src/crash.c
index 279290a..3f6cd56 100644
--- a/src/crash.c
+++ b/src/crash.c
@@ -343,8 +343,10 @@ static void crash_debug(unsigned long crash_pid,
 		char **argptr = argp;
 		gchar *filespec = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, DEBUGGERRC, NULL);
 
-		setgid(getgid());
-		setuid(getuid());
+		if (setgid(getgid()) != 0)
+			perror("setgid");
+		if (setuid(getuid()) != 0)
+			perror("setuid");
 
 		/*
 		 * setup debugger to attach to crashed claws
@@ -364,7 +366,8 @@ static void crash_debug(unsigned long crash_pid,
 		 * redirect output to write end of pipe
 		 */
 		close(1);
-		dup(choutput[1]);
+		if (dup(choutput[1]) < 0)
+			perror("dup");
 		close(choutput[0]);
 		if (-1 == execvp("gdb", argp)) 
 			g_print("error execvp\n");
@@ -538,9 +541,12 @@ static void crash_handler(int sig)
 		args[3] = buf;
 		args[4] = NULL;
 
-		chdir(claws_get_startup_dir());
-		setgid(getgid());
-		setuid(getuid());
+		if (chdir(claws_get_startup_dir()) != 0)
+			perror("chdir");
+		if (setgid(getgid()) != 0)
+			perror("setgid");
+		if (setuid(getuid()) != 0 )
+			perror("setuid");
 		execvp(argv0, args);
 	} else {
 		waitpid(pid, NULL, 0);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list