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/providers/imap/camel-imap-search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'camel/providers') 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