diff --git a/doc/Changelog b/doc/Changelog index 265a34797..e056a4a33 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -5,6 +5,7 @@ - pythonmod logs the python error and traceback on failure. - ignore debug python module for test in doxygen output. - review fixes for python module. + - Fix #4209: Crash in libunbound when called from getdns. 21 November 2018: Wouter - Scrub NS records from NODATA responses as well. diff --git a/libunbound/libworker.c b/libunbound/libworker.c index 065f0a7b1..a886f9a88 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -657,8 +657,8 @@ libworker_event_done_cb(void* arg, int rcode, sldns_buffer* buf, sec = 1; else if(s == sec_status_secure) sec = 2; - (*cb)(cb_arg, rcode, (void*)sldns_buffer_begin(buf), - (int)sldns_buffer_limit(buf), sec, why_bogus, was_ratelimited); + (*cb)(cb_arg, rcode, (buf?(void*)sldns_buffer_begin(buf):NULL), + (buf?(int)sldns_buffer_limit(buf):0), sec, why_bogus, was_ratelimited); } }