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
271fa930
Commit
271fa930
authored
Aug 20, 1999
by
Andreas Gustafsson
Browse files
added sanity check of journal RR size
parent
095f11ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/dns/journal.c
View file @
271fa930
...
...
@@ -1884,9 +1884,17 @@ read_one_rr(dns_journal_t *j) {
}
/* Read an RR. */
result
=
journal_read_rrhdr
(
j
,
&
rrhdr
);
if
(
rrhdr
.
size
==
0
)
{
/*
* Perform a sanity check on the journal RR size.
* The smallest possible RR has a 1-byte owner name
* and a 10-byte header. The largest possible
* RR has 65535 bytes of data, a header, and a maximum-
* size owner name, well below 70 k total.
*/
if
(
rrhdr
.
size
<
1
+
10
||
rrhdr
.
size
>
70000
)
{
UNEXPECTED_ERROR
(
__FILE__
,
__LINE__
,
"journal corrupt: empty RR"
);
"journal corrupt: impossible RR size "
"(%d bytes)"
,
rrhdr
.
size
);
FAIL
(
DNS_R_UNEXPECTED
);
}
...
...
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