instead of an assertion failure.
git-svn-id: file:///svn/unbound/trunk@2420
be551aaa-1e26-0410-a405-
d3ace91eadb9
- Fix assertion failure when unbound generates an empty error reply
in response to a query, CVE-2011-1922 VU#531342.
- This fix is in tag 1.4.10.
+ - defense in depth against the above bug, an error is printed to log
+ instead of an assertion failure.
10 May 2011: Wouter
- bug#386: --enable-allsymbols option links all binaries to libunbound
#endif /* S_SPLINT_S */
log_assert(c->fd != -1);
- log_assert(ldns_buffer_remaining(packet) > 0);
+#ifdef UNBOUND_DEBUG
+ if(ldns_buffer_remaining(packet) == 0)
+ log_err("error: send empty UDP packet");
+#endif
log_assert(addr && addrlen > 0);
msg.msg_name = addr;