[rrd-developers] patch for bug #148
Matthew Boyle
mlb at decisionsoft.com
Tue Apr 22 20:25:01 CEST 2008
rrd_open() returns either a pointer or NULL, but PyRRD_info() tests the
return value against -1. if there's a problem opening the file, the
error handling code is skipped anyway, and it attempts to fclose() an
invalid filehandle. the fclose() is unnecessary anyway, because any
opened files are already closed by rrd_open().
there's also a mismatch between the function definitions for rrd_open in
src/rrd.h and bindings/python/rrd_extra.h. so rrd_open() gets a bad
pointer to the rrd_t struct. when this parameter gets initialised, it
results in the saved %ebp and %eip being overwritten with NULLs. this
is obviously a slight problem when PyRRD_info() tries to return.
the attached patch (against svn r1331) should fix both these issues.
cheers,
--matt
--
Matthew Boyle
Junior Systems Administrator
DecisionSoft Limited http://www.decisionsoft.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rrdtool-bug148.patch
Type: text/x-patch
Size: 1120 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20080422/08f89eb6/attachment.bin
More information about the rrd-developers
mailing list