dereferencing a null string pointer later).
* match types, and does a better job (eg server doesn't support regexps). */
static int imap_compile_search (const pattern_t* pat, BUFFER* buf)
{
- char term[STRING];
-
if (! do_search (pat, 0))
return 0;
}
else
{
+ char term[STRING];
char *delim;
switch (pat->op)
snprintf (err->data, err->dsize, _("Error in expression: %s"), s->dptr);
return (-1);
}
+ if (!*buf.data)
+ {
+ snprintf (err->data, err->dsize, _("Empty expression"));
+ return (-1);
+ }
#if 0
/* If there are no RE metacharacters, use simple search anyway */