aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/providers/imap/camel-imap-search.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 49f3e64c11..07e165d70c 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -13,6 +13,10 @@
2002-04-04 Not Zed <NotZed@Ximian.com>
+ * providers/imap/camel-imap-search.c (imap_body_contains): If
+ (body-contains) is not passed any arguments, return empty/false.
+ Fixes a crash exposed by #15001.
+
* camel-remote-store.c (remote_connect): Reset the keepalive
timeout to 10 minutes rather than the 30 seconds I was using for
testing.
diff --git a/camel/providers/imap/camel-imap-search.c b/camel/providers/imap/camel-imap-search.c
index b184843f27..8463eb202b 100644
--- a/camel/providers/imap/camel-imap-search.c
+++ b/camel/providers/imap/camel-imap-search.c
@@ -411,7 +411,7 @@ imap_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, Came
g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(info));
}
}
- } else if (s->summary->len == 0) {
+ } else if (argc == 0 || s->summary->len == 0) {
/* nothing to match case, do nothing (should be handled higher up?) */
if (s->current) {
r = e_sexp_result_new(f, ESEXP_RES_BOOL);