[Commits] [SCM] claws branch, master, updated. 3.9.3-25-g589150b
mones at claws-mail.org
mones at claws-mail.org
Wed Feb 19 01:38:18 CET 2014
The branch master of project "claws" (Claws Mail) has been updated
via 589150b9d9ce105644592595ea44ea6d3014e121 (commit)
from 0f01f386bf387482746d87700a6bd2aef93ec0e3 (commit)
- Log -----------------------------------------------------------------
commit 589150b9d9ce105644592595ea44ea6d3014e121
Author: Ricardo Mones <ricardo at mones.org>
Date: Wed Feb 19 01:36:37 2014 +0100
Remove some X-Face cruft and check after realloc
diff --git a/src/headerview.c b/src/headerview.c
index 1ea12ba..2d7074b 100644
--- a/src/headerview.c
+++ b/src/headerview.c
@@ -47,10 +47,6 @@
#include "addrindex.h"
#if HAVE_LIBCOMPFACE
-#define XPM_XFACE_HEIGHT (HEIGHT + 3) /* 3 = 1 header + 2 colors */
-
-static gchar *xpm_xface[XPM_XFACE_HEIGHT];
-
static gint headerview_show_xface (HeaderView *headerview,
MsgInfo *msginfo);
#endif
@@ -193,17 +189,6 @@ void headerview_init(HeaderView *headerview)
headerview_set_font(headerview);
headerview_clear(headerview);
headerview_set_visibility(headerview, prefs_common.display_header_pane);
-
-#if HAVE_LIBCOMPFACE
- {
- gint i;
-
- for (i = 0; i < XPM_XFACE_HEIGHT; i++) {
- xpm_xface[i] = g_malloc(WIDTH + 1);
- *xpm_xface[i] = '\0';
- }
- }
-#endif
}
void headerview_show(HeaderView *headerview, MsgInfo *msginfo)
diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c
index f06c88c..d30ef72 100644
--- a/src/plugins/pgpcore/sgpgme.c
+++ b/src/plugins/pgpcore/sgpgme.c
@@ -947,6 +947,10 @@ void *sgpgme_data_release_and_get_mem(gpgme_data_t data, size_t *len)
cm_gpgme_data_rewind(data);
while ((r = gpgme_data_read(data, buf, BUFSIZ)) > 0) {
result = realloc(result, r + w);
+ if (result == NULL) {
+ g_warning("can't allocate memory\n");
+ return NULL;
+ }
memcpy(result+w, buf, r);
w += r;
}
diff --git a/src/textview.c b/src/textview.c
index cac63bf..5575bfd 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -41,10 +41,6 @@
# include <compface.h>
#endif
-#if HAVE_LIBCOMPFACE
-#define XPM_XFACE_HEIGHT (HEIGHT + 3) /* 3 = 1 header + 2 colors */
-#endif
-
#include "main.h"
#include "summaryview.h"
#include "procheader.h"
-----------------------------------------------------------------------
Summary of changes:
src/headerview.c | 15 ---------------
src/plugins/pgpcore/sgpgme.c | 4 ++++
src/textview.c | 4 ----
3 files changed, 4 insertions(+), 19 deletions(-)
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list