I think I've found the cause:

conf_yacc.y declares the conftext variable with
  extern char* conftext;

However, the autogenerated conf_lex.c declares it as
  char conftext[YYLMAX];

If there's a syntax error in the config file (or aide tries to parse
something that isn't a config file), then the following line (in
conf_yacc.y) gets executed:

  error(0,"%i:%s:%s\n",conf_lineno,msg,conftext);

As conftext is believed to be a pointer here, its contents (the text
that caused the syntax error) are mistakenly treated as an address,
usually leading to a segfault somewhere down in the string-formatting
functions.

The following one-line change works for me:

---------------------------------------------
diff -ur aide-0.10/src/conf_yacc.y aide-0.10-fixed/src/conf_yacc.y
--- aide-0.10/src/conf_yacc.y   2003-08-18 14:03:22.000000000 +0100
+++ aide-0.10-fixed/src/conf_yacc.y     2005-04-07 21:13:38.907968896 +0100
@@ -35,7 +35,7 @@
 extern int conflex();
 void conferror(const char*);
 
-extern char* conftext;
+extern char conftext[];
 extern long conf_lineno;
---------------------------------------------
 
Glyn


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to