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.
70 jobs for !5079 with 2713-intermittent-crashes-in-the-tkey-system-test-caused-by-broken-dns_name_t-structures in 1 minute and 50 seconds (queued for 9 seconds)
latest detached
Status Job ID Name Coverage
  Autoconf
passed #1740059
amd64 linux
autoreconf

00:00:17

 
  Precheck
passed #1740061
amd64 linux
clang-format

00:00:17

canceled #1740062
amd64 linux
coccinelle

00:01:48

passed #1740063
amd64 linux
danger

00:00:16

passed #1740060
amd64 linux
misc

00:00:22

canceled #1740064
amd64 linux
tarball-create

00:01:31

 
  Build
canceled #1740075
amd64 linux
clang:asan

00:01:22

passed #1740079
amd64 linux
clang:buster:amd64

00:00:59

passed #1740082
amd64 libvirt
clang:freebsd11:amd64

00:01:11

passed #1740083
amd64 libvirt
clang:freebsd12:amd64

00:01:12

canceled #1740084
amd64 libvirt
clang:openbsd:amd64

00:01:28

passed #1740077
amd64 linux
clang:tsan

00:01:09

passed #1740065
amd64 linux
gcc:alpine3.13:amd64

00:01:02

canceled #1740074
amd64 linux
gcc:asan

00:01:23

passed #1740069
amd64 linux
gcc:buster:amd64

00:00:43

passed #1740066
amd64 linux
gcc:centos7:amd64

00:00:44

passed #1740067
amd64 linux
gcc:centos8:amd64

00:00:54

passed #1740073
amd64 linux
gcc:focal:amd64

00:00:52

passed #1740078
amd64 linux
gcc:mutexatomics

00:00:54

passed #1740071
amd64 linux
gcc:out-of-tree

00:00:55

passed #1740070
amd64 linux
gcc:sid:amd64

00:01:02

passed #1740080
amd64 linux
gcc:softhsm2.4

00:00:50

passed #1740081
amd64 linux
gcc:softhsm2.6

00:00:49

passed #1740068
amd64 linux
gcc:stretch:amd64

00:00:55

passed #1740076
amd64 linux
gcc:tsan

00:00:56

passed #1740072
amd64 linux
gcc:tumbleweed:amd64

00:00:57

passed #1740085
amd64 windows
msvc:windows:amd64

00:00:47

 
  Unit
canceled #1740095
amd64 linux
unit:clang:asan

canceled #1740099
amd64 linux
unit:clang:buster:amd64

00:00:29

canceled #1740102
amd64 libvirt
unit:clang:freebsd11:amd64

00:00:16

canceled #1740103
amd64 libvirt
unit:clang:freebsd12:amd64

00:00:12

canceled #1740104
amd64 libvirt
unit:clang:openbsd:amd64

canceled #1740097
amd64 linux
unit:clang:tsan

00:00:08

canceled #1740086
amd64 linux
unit:gcc:alpine3.13:amd64

00:00:23

canceled #1740094
amd64 linux
unit:gcc:asan

canceled #1740090
amd64 linux
unit:gcc:buster:amd64

00:00:43

canceled #1740087
amd64 linux
unit:gcc:centos7:amd64

00:00:43

canceled #1740088
amd64 linux
unit:gcc:centos8:amd64

00:00:31

canceled #1740093
amd64 linux
unit:gcc:focal:amd64

00:00:30

canceled #1740098
amd64 linux
unit:gcc:mutexatomics

00:00:20

canceled #1740091
amd64 linux
unit:gcc:sid:amd64

00:00:23

canceled #1740100
amd64 linux
unit:gcc:softhsm2.4

00:00:39

canceled #1740101
amd64 linux
unit:gcc:softhsm2.6

00:00:41

passed #1740089
amd64 linux
unit:gcc:stretch:amd64

00:00:16

canceled #1740096
amd64 linux
unit:gcc:tsan

00:00:21

canceled #1740092
amd64 linux
unit:gcc:tumbleweed:amd64

00:00:22

 
  System
canceled #1740114
amd64 linux
system:clang:asan

canceled #1740118
amd64 linux
system:clang:buster:amd64

00:00:24

canceled #1740121
amd64 libvirt
system:clang:freebsd11:amd64

00:00:15

canceled #1740122
amd64 libvirt
system:clang:freebsd12:amd64

00:00:12

canceled #1740116
amd64 linux
system:clang:tsan

00:00:08

canceled #1740105
amd64 linux
system:gcc:alpine3.13:amd64

00:00:18

canceled #1740113
amd64 linux
system:gcc:asan

canceled #1740109
amd64 linux
system:gcc:buster:amd64

canceled #1740106
amd64 linux
system:gcc:centos7:amd64

00:00:43

canceled #1740107
amd64 linux
system:gcc:centos8:amd64

00:00:30

canceled #1740112
amd64 linux
system:gcc:focal:amd64

00:00:30

canceled #1740117
amd64 linux
system:gcc:mutexatomics

00:00:15

canceled #1740110
amd64 linux
system:gcc:sid:amd64

00:00:17

canceled #1740119
amd64 linux
system:gcc:softhsm2.4

00:00:39

canceled #1740120
amd64 linux
system:gcc:softhsm2.6

00:00:40

canceled #1740108
amd64 linux
system:gcc:stretch:amd64

00:00:26

canceled #1740115
amd64 linux
system:gcc:tsan

00:00:16

canceled #1740111
amd64 linux
system:gcc:tumbleweed:amd64

00:00:17

 
  Docs
passed #1740123
amd64 linux
docs

00:00:53

 
  Postcheck
passed #1740127
amd64 linux
cppcheck

00:00:51

passed #1740124
amd64 linux
flake8

00:00:26

canceled #1740128
amd64 linux
gcov

passed #1740125
amd64 linux
pylint

00:00:29

canceled #1740126
amd64 linux
scan-build

00:01:18