From ee5332f908d7bae0796e60e9de0c29c3b132883b Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 5 Apr 2002 08:06:47 +0000 Subject: If (body-contains) is not passed any arguments, return empty/false. Fixes 2002-04-04 Not Zed * 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. svn path=/trunk/; revision=16362 --- camel/ChangeLog | 4 ++++ camel/providers/imap/camel-imap-search.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 + * 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); -- cgit v1.2.3