Commits

Michael Elkins  committed 25e1286

Fix crash on invalid regexp in search string due to uninitialized BUFFER variable.

Closes #3401

  • Participants
  • Parent commits b9baa02
  • Branches HEAD

Comments (0)

Files changed (1)

   char buf[STRING];
   char temp[LONG_STRING];
   char error[STRING];
-  BUFFER err;
   int incr;
   HEADER *h;
   progress_t progress;
     mutt_check_simple (temp, sizeof (temp), NONULL (SimpleSearch));
 
     if (!SearchPattern || mutt_strcmp (temp, LastSearchExpn))
-     {
+    {
+      BUFFER err;
+      memset(&err, 0, sizeof(err));
       set_option (OPTSEARCHINVALID);
       strfcpy (LastSearch, buf, sizeof (LastSearch));
       mutt_message _("Compiling search pattern...");