]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #4209: Crash in libunbound when called from getdns.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 22 Nov 2018 15:07:30 +0000 (15:07 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 22 Nov 2018 15:07:30 +0000 (15:07 +0000)
git-svn-id: file:///svn/unbound/trunk@4971 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
libunbound/libworker.c

index 265a34797f8a7969f5b87d96b81766b53f8c7a9a..e056a4a338930796f2639ea16dbaf6af04ae1e46 100644 (file)
@@ -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.
index 065f0a7b141aab943b7ac55ce20487cab5907cfc..a886f9a8811370d788ee0d8b4ff1fc6b09749cd2 100644 (file)
@@ -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);
        }
 }