[Iftop-users] Segfault on Fedora

richard lucassen iftop-users at lists.beasts.org
Fri, 19 Mar 2004 10:57:43 +0100


On Fri, 19 Mar 2004 09:39:02 +0000
Chris Lightfoot <chris@ex-parrot.com> wrote:

> diff -u -r1.4 cfgfile.c
> --- cfgfile.c   4 Nov 2003 11:57:45 -0000       1.4
> +++ cfgfile.c   19 Mar 2004 09:38:34 -0000
> @@ -45,9 +45,9 @@
>  extern options_t options ;
>  
>  int is_cfgdirective_valid(const char *s) {
> -    char* t;
> -    for (t = config_directives[0]; t != NULL; ++t)
> -        if (strcmp(s, t) == 0) return 1;
> +    char **t;
> +    for (t = config_directives; t != NULL; ++t)
> +        if (strcmp(s, *t) == 0) return 1;
>      return 0;
>  }

Yep. This works fine!

R.