Hi all,<br><br>I had some problems with history.cgi where it consistently coredumped on me.<br>After some searching, it seems that history.c assumes that each line in nagios.log has a certain maximum lenght (MAX_INPUT_BUFFER) but some plugins write more info away there (like the check_oracle_health plugin in my case).<br>
But the issue is: when such a long line is found, history.c doesn't chop it off after MAX_INPUT_BUFFER characters and as such coredumps ...<br>Solution: add the line <br><br>input[MAX_INPUT_BUFFER]='\x0';<br><br>
at around line 551 in cgi/history.c (before the "strip(input);" line), so the code becomes:<br><br> printf("<P><DIV CLASS='logEntries'>\n");<br><br> while(1){<br><br> free(input);<br>
<br> if(use_lifo==TRUE){<br> if((input=pop_lifo())==NULL)<br> break;<br> }<br> else{<br> &nbs
p; if((input=mmap_fgets(thefile))==NULL)<br>
break;<br> }<br><br> input[MAX_INPUT_BUFFER]='\x0';<br> strip(input);<br><br>This solves my problem for now, but I don't know if it is the correct solution of course ...<br>
<br>Franky<br>