<<< Date Index >>>     <<< Thread Index >>>

Re: Fwd: Bug#237426: mutt: Mutt segfaults when trying to attach from an inaccessible directory



Hey, mutt-dev!

No one replied?
Is it bad to delete one of two destroy_state(&state)?
Both FreeBSD and Linux-glibc systems really segfaulted
without his fix. And his suggestion really fixed the
problem for both of them. Any side-effect or better way?


Index: browser.c
===================================================================
RCS file: /home/roessler/cvs/mutt/browser.c,v
retrieving revision 3.9
diff -u -r3.9 browser.c
--- browser.c   19 Sep 2003 13:03:25 -0000      3.9
+++ browser.c   7 May 2004 11:03:01 -0000
@@ -945,7 +945,6 @@
            if (S_ISDIR (st.st_mode))
            {
              strfcpy (LastDir, buf, sizeof (LastDir));
-             destroy_state (&state);
              if (examine_directory (menu, &state, LastDir, prefix) == 0)
              {
                menu->current = 0; 




On Mon, 03 May 2004, Adeodato Simó wrote:

> The error is caused at browser.c:958. When an unreadable directory is
> found, an error is displayed, and the `state' is deleted. Only, ten
> lines or what above that line 958 the state is already deleted (because
> it is no longer necessary?). This obviously creates a problem. Simply
> removing the `destroy_state' call at line 958 appears to fix the
> problem, the segfault is the gone. I have already checked the CVS
> version, it still had both destroy_state calls (although I have nog
> compiled the latest CVS version).
> You should be able to fix this now?

> Btw, quick reply ;-) Quick replies are good...