Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
ac5921d1
Commit
ac5921d1
authored
Nov 10, 2000
by
Brian Wellington
Browse files
validating that rdata of a known type expressed using the unknown type
syntax is correct didn't work.
parent
3a166684
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/dns/rdata.c
View file @
ac5921d1
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.c,v 1.12
1
2000/11/10 0
0:25
:4
6
bwelling Exp $ */
/* $Id: rdata.c,v 1.12
2
2000/11/10 0
1:37
:4
0
bwelling Exp $ */
#include <config.h>
#include <ctype.h>
...
...
@@ -540,14 +540,21 @@ rdata_valid(isc_buffer_t *buf, dns_rdataclass_t rdclass, dns_rdatatype_t type,
isc_buffer_t
*
tbuf
=
NULL
;
dns_decompress_t
dctx
;
dns_rdata_t
rdata
;
isc_region_t
r
;
isc_result_t
result
;
dns_decompress_init
(
&
dctx
,
-
1
,
ISC_TRUE
);
dns_rdata_init
(
&
rdata
);
result
=
isc_buffer_allocate
(
mctx
,
&
tbuf
,
isc_buffer_length
(
buf
));
result
=
isc_buffer_allocate
(
mctx
,
&
tbuf
,
isc_buffer_
used
length
(
buf
));
if
(
result
==
ISC_R_SUCCESS
)
{
isc_buffer_setactive
(
buf
,
isc_buffer_usedlength
(
buf
));
result
=
dns_rdata_fromwire
(
&
rdata
,
rdclass
,
type
,
buf
,
&
dctx
,
ISC_FALSE
,
tbuf
);
isc_buffer_clear
(
buf
);
if
(
result
==
ISC_R_SUCCESS
)
{
isc_buffer_usedregion
(
tbuf
,
&
r
);
(
void
)
isc_buffer_copyregion
(
buf
,
&
r
);
}
isc_buffer_free
(
&
tbuf
);
}
dns_decompress_invalidate
(
&
dctx
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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