Xymon Mailing List Archive search

Core dump in svcstatus.c (historylog) with empty TIMEBUF

list Henrik Størner
Mon, 09 May 2011 08:15:43 +0200
Message-Id: <user-d87e76a2a5c5@xymon.invalid>

On 09-05-2011 07:34, Jeremy Laidman wrote:
I can crash svcstatus, causing a core dump, by doing a historylog
query with an empty TIMEBUF value (or setting it to things like
"%00").  It's indirectly caused by a successful stat() on a directory
and then assuming that it's a file,
Yep, it shouldn't try to do that.
My fix is to catch the special
case of a directory.
Better to check if it's a regular file (i.e. not  a pipe, socket, ...)
See attached.


Regards,
Henrik
Attachments (1)