mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-28 02:29:51 -05:00
Two small fixes.
git-svn-id: file:///svn/unbound/trunk@905 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
a6c543362d
commit
193892e52d
3 changed files with 11 additions and 0 deletions
|
|
@ -1,3 +1,9 @@
|
|||
28 January 2008: Wouter
|
||||
- fixup uninit use of buffer by libunbound (query id, flags) for
|
||||
local_zone answers.
|
||||
- fixup uninit warning from random.c; also seems to fix sporadic
|
||||
sigFPE coming out of openssl.
|
||||
|
||||
25 January 2008: Wouter
|
||||
- added tpkg for asynclook and library use.
|
||||
- allows localhost to be queried when as a library.
|
||||
|
|
|
|||
|
|
@ -511,6 +511,8 @@ int libworker_fg(struct ub_val_ctx* ctx, struct ctx_query* q)
|
|||
qflags = BIT_RD;
|
||||
q->w = w;
|
||||
/* see if there is a fixed answer */
|
||||
ldns_buffer_write_u16_at(w->back->udp_buff, 0, qid);
|
||||
ldns_buffer_write_u16_at(w->back->udp_buff, 2, qflags);
|
||||
if(local_zones_answer(ctx->local_zones, &qinfo, &edns,
|
||||
w->back->udp_buff, w->env->scratch)) {
|
||||
libworker_fg_done_cb(q, LDNS_RCODE_NOERROR,
|
||||
|
|
@ -635,6 +637,8 @@ handle_newq(struct libworker* w, uint8_t* buf, uint32_t len)
|
|||
qid = 0;
|
||||
qflags = BIT_RD;
|
||||
/* see if there is a fixed answer */
|
||||
ldns_buffer_write_u16_at(w->back->udp_buff, 0, qid);
|
||||
ldns_buffer_write_u16_at(w->back->udp_buff, 2, qflags);
|
||||
if(local_zones_answer(w->ctx->local_zones, &qinfo, &edns,
|
||||
w->back->udp_buff, w->env->scratch)) {
|
||||
q->msg_security = sec_status_insecure;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ ub_arc4random_stir(struct ub_hiddenstate* s)
|
|||
int i;
|
||||
|
||||
memset(&s->rc4, 0, sizeof(s->rc4));
|
||||
memset(rand_buf, 0xc, sizeof(rand_buf));
|
||||
if (RAND_bytes(rand_buf, (int)sizeof(rand_buf)) <= 0)
|
||||
fatal_exit("Couldn't obtain random bytes (error %ld)",
|
||||
ERR_get_error());
|
||||
|
|
|
|||
Loading…
Reference in a new issue