[ldns-users] Missing NULL check in ldns_rr_compare_ds
mail at maxliebkies.de
Mon Jun 23 17:34:31 UTC 2014
I recently stumbled over a segfault in the Python ldns wrapper in the
ldns_rr_compare_ds method. I seem to have been calling the method with
at least one argument being None. As the underlying C method clones both
ldns_rr structs first but doesn't check the return value of
ldns_rr_clone, the subsequent calls to ldns_rr_set_ttl will segfault.
How to reproduce with python:
>>> from ldns import ldns_rr_compare_ds
>>> ldns_rr_compare_ds(None, None)
Please see the attached patch for a fix in rr.c
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 445 bytes
More information about the ldns-users