Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
9b0c4bf7
Commit
9b0c4bf7
authored
Jan 11, 2001
by
Brian Wellington
Browse files
675. [func] TKEY queries could cause the server to leak
memory.
parent
de832d13
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
9b0c4bf7
675. [func] TKEY queries could cause the server to leak
memory.
674. [func] Allow messages to be TSIG signed / verified using
a offset from the current time.
...
...
lib/dns/tkey.c
View file @
9b0c4bf7
...
...
@@ -16,7 +16,7 @@
*/
/*
* $Id: tkey.c,v 1.
59
2001/01/11 04:
00:17
bwelling Exp $
* $Id: tkey.c,v 1.
60
2001/01/11 04:
23:39
bwelling Exp $
*/
#include
<config.h>
...
...
@@ -154,19 +154,39 @@ add_rdata_to_list(dns_message_t *msg, dns_name_t *name, dns_rdata_t *rdata,
return
(
ISC_R_SUCCESS
);
failure:
if
(
newrdata
!=
NULL
)
if
(
newrdata
!=
NULL
)
{
if
(
ISC_LINK_LINKED
(
newrdata
,
link
))
ISC_LIST_UNLINK
(
newlist
->
rdata
,
newrdata
,
link
);
dns_message_puttemprdata
(
msg
,
&
newrdata
);
}
if
(
newname
!=
NULL
)
dns_message_puttempname
(
msg
,
&
newname
);
if
(
newlist
!=
NULL
)
dns_message_puttemprdatalist
(
msg
,
&
newlist
);
if
(
newset
!=
NULL
)
{
dns_rdataset_disassociate
(
newset
);
dns_message_puttemprdataset
(
msg
,
&
newset
);
}
if
(
newlist
!=
NULL
)
dns_message_puttemprdatalist
(
msg
,
&
newlist
);
return
(
result
);
}
static
void
free_namelist
(
dns_message_t
*
msg
,
dns_namelist_t
*
namelist
)
{
dns_name_t
*
name
;
dns_rdataset_t
*
set
;
while
(
!
ISC_LIST_EMPTY
(
*
namelist
))
{
name
=
ISC_LIST_HEAD
(
*
namelist
);
ISC_LIST_UNLINK
(
*
namelist
,
name
,
link
);
while
(
!
ISC_LIST_EMPTY
(
name
->
list
))
{
set
=
ISC_LIST_HEAD
(
name
->
list
);
ISC_LIST_UNLINK
(
name
->
list
,
set
,
link
);
dns_message_puttemprdataset
(
msg
,
&
set
);
}
dns_message_puttempname
(
msg
,
&
name
);
}
}
static
isc_result_t
compute_secret
(
isc_buffer_t
*
shared
,
isc_region_t
*
queryrandomness
,
isc_region_t
*
serverrandomness
,
isc_buffer_t
*
secret
)
...
...
@@ -777,6 +797,8 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
dns_message_puttemprdata
(
msg
,
&
rdata
);
if
(
dynbuf
!=
NULL
)
isc_buffer_free
(
&
dynbuf
);
if
(
!
ISC_LIST_EMPTY
(
namelist
))
free_namelist
(
msg
,
&
namelist
);
return
(
result
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment