From 96701cc78b59b8fdc6816e58d24d96d3f27e9ae4 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 1 Dec 1998 19:29:53 +0000 Subject: Bug in FAQ item R5 fixed. svn path=/trunk/; revision=2249 --- NEWS | 4 +++- fetchmail-FAQ.html | 33 +++++++++------------------------ netrc.c | 2 +- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/NEWS b/NEWS index 40f9d14a..10685001 100644 --- a/NEWS +++ b/NEWS @@ -6,8 +6,10 @@ fetchmail-4.6.9 (): * Prevent core dumps on 'for' and 'by' in names (bug introduced in 4.6.8). * Peter Hamlen's fix for bounce-message generation. * Silent mode now suppresses progress messages from 2xx responses in ETRN. +* Fix for netrc.c core dump from Michael Pearce + . -There are 247 people on fetchmail-friends and 309 on fetchmail-announce. +There are 244 people on fetchmail-friends and 315 on fetchmail-announce. fetchmail-4.6.8 (Sat Nov 28 21:07:46 EST 1998): * Added bounce-mail capability on SMTP/ESMTP error conditions. diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html index 509896b2..0d8203ab 100644 --- a/fetchmail-FAQ.html +++ b/fetchmail-FAQ.html @@ -10,7 +10,7 @@
Back to Fetchmail Home Page To Site Map -$Date: 1998/12/01 07:14:18 $ +$Date: 1998/12/01 19:29:53 $

Frequently Asked Questions About Fetchmail

@@ -89,10 +89,9 @@ IP address?
R2. When I try to configure an MDA, fetchmail doesn't work.
R3. Fetchmail dumps core when given an invalid rc file.
R4. Fetchmail dumps core in -V mode, but operates normally otherwise.
-R5. Fetchmail dumps core when I use a .netrc file but works otherwise.
-R6. Running fetchmail in daemon mode doesn't work.
-R7. Fetchmail hangs when used with pppd.
-R8. Fetchmail randomly dies with socket errors.
+R5. Running fetchmail in daemon mode doesn't work.
+R6. Fetchmail hangs when used with pppd. +R7. Fetchmail randomly dies with socket errors.

Disappearing mail

@@ -1615,24 +1614,10 @@ calls on the same pointer (the malloc arena gets corrupted). Unfortunately it appears from doing gdb traces that whatever free() calls producing the problem are being made by the C library itself, not the fetchmail code (they're all from within fclose, and not an fclose called -by fetchmail, either).

+directly by fetchmail, either).


-

R5. Fetchmail dumps core when I use a .netrc file but works otherwise.

- -We have a report that under Solaris 2.5 using gcc-2.7.2, if fetchmail -is compiled with -O or -O2, it segfaults on startup when reading a -.netrc.

- -You can work around this by disabling optimization.

- -There may be an actual bug here that the optimizer exposes; the stack -trace says the segfault is in free() and has all the earmarks of a heap- -corruption screw. But the symptom doesn't reproduce under Linux with the -same .fetchmailrc and .netrc.

- -


-

R6. Running fetchmail in daemon mode doesn't work.

+

R5. Running fetchmail in daemon mode doesn't work.

We have one report from a Solaris 4.1.4 user that trying to run fetchmail in detached daemon mode doesn't work, but that using the @@ -1646,14 +1631,14 @@ fetchmail with -N and an ampersand to background it.

This should not happen under Linux or any truly POSIX-conformant Unix.


-

R7. Fetchmail hangs when used with pppd.

+

R6. Fetchmail hangs when used with pppd.

Your problem may be with pppd's `demand' option. We have a report that fetchmail doesn't play well with it, but works with pppd if `demand' is turned off. We have no idea why this is.


-

R8. Fetchmail randomly dies with socket errors.

+

R7. Fetchmail randomly dies with socket errors.

Check the MTU value in your PPP interface reported by /sbin/ifconfig. If it's over 600, change it in your PPP @@ -2222,7 +2207,7 @@ Re-ordering messages is a user-agent function, anyway.

Back to Fetchmail Home Page To Site Map -$Date: 1998/12/01 07:14:18 $ +$Date: 1998/12/01 19:29:53 $

Eric S. Raymond <esr@snark.thyrsus.com>
diff --git a/netrc.c b/netrc.c index 494a3c96..a5263c41 100644 --- a/netrc.c +++ b/netrc.c @@ -119,7 +119,7 @@ parse_netrc (file) /* Strip trailing CRLF */ p = buf + strlen(buf) - 1; - while (*p && isspace(*p)) + while ((p > buf) && *p && isspace(*p)) *p-- = '\0'; /* Parse the line. */ -- cgit v1.2.3