Files
bind9/lib/dns
Ondřej Surý ac25fb9439 Use dns_name_copynf() with dns_message_gettempname() when needed
dns_message_gettempname() returns an initialized name with a dedicated
buffer, associated with a dns_fixedname object.  Using dns_name_copynf()
to write a name into this object will actually copy the name data
from a source name. dns_name_clone() merely points target->ndata to
source->ndata, so it is faster, but it can lead to a use-after-free if
the source is freed before the target object is released via
dns_message_puttempname().

In a few places, clone was being used where copynf should have been;
this is now fixed.

As a side note, no memory was lost, because the ndata buffer used in
the dns_fixedname_t is internal to the structure, and is freed when
the dns_fixedname_t is freed regardless of the .ndata contents.

(cherry picked from commit ce3e1abc1d)
2021-05-22 07:17:01 +02:00
..
2021-04-19 14:32:53 +02:00
2020-11-11 15:59:56 -03:00
2021-02-23 09:18:55 +01:00
2021-05-19 09:05:35 +02:00
2020-12-01 23:19:20 +11:00
2020-12-08 19:34:05 +01:00
2020-11-11 15:59:56 -03:00
2020-11-11 15:59:56 -03:00
2021-05-20 09:52:53 +02:00
2021-01-28 12:18:31 +11:00