[Iftop-users] iftop segfaults on amd64 (proposed patch)

Chris Lightfoot chris at ex-parrot.com
Fri, 2 Dec 2005 10:36:46 +0000


On Fri, Dec 02, 2005 at 11:30:55AM +0100, William Robinet wrote:
> Hi,
> 
> Iftop segfaults on my amd64 machine (Gentoo Linux 2.6.14) when I'm using a
> .iftoprc file containing the line:
> dns-resolution: no

oops. I'm not really sure how that ever worked. Can you
try this slightly shorter patch?

diff -u -r1.5 cfgfile.c
--- cfgfile.c   19 Mar 2004 10:08:47 -0000      1.5
+++ cfgfile.c   2 Dec 2005 10:32:06 -0000
@@ -46,7 +46,7 @@
 
 int is_cfgdirective_valid(const char *s) {
     char **t;
-    for (t = config_directives; t != NULL; ++t)
+    for (t = config_directives; *t != NULL; ++t)
         if (strcmp(s, *t) == 0) return 1;
     return 0;
 }


-- 
``It has only to do with the respect with which we regard one another, the
  dignity of men, our love of culture.... It has nothing to do directly with
  defending our country except to make it worth defending.''
  (Robert Wilson, answering a Congressional question on Fermilab)