On Tue, Feb 05, 2013 at 12:02:17AM +0100, Dan Fandrich wrote:
> I managed to get collectd to segfault in a couple of places while playing
> with it a bit. The first is in the curl_xml module when the XPATH expression
> doesn't quite match the input. 

I've spotted some other questionable code around there.
cx_handle_instance_xpath() line 362 unconditionally clears the block starting
at vl->type_instance, but only at line 368 does it check if that's a NULL
pointer. Also, line 387 sets tmp_size to 0 if instance_node is NULL, then
exits the function on line 395. Then, way down at line 420, it checks
if instance_node is NULL and treats it differently, but it cannot be NULL
at that point. Clearly, the logic in this module needs some love. I don't
quite feel so bad now in failing to get my XPATH configuration right on the
first try!

>>> Dan

Attachment: pgpVmPkRvlq21.pgp
Description: PGP signature

_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to