Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
635
Issues
635
List
Boards
Labels
Service Desk
Milestones
Merge Requests
107
Merge Requests
107
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
af2b20ee
Commit
af2b20ee
authored
Feb 14, 2017
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4574. [bug] Dig leaked memory with multiple +subnet options.
[RT #44683]
parent
1df7a6fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
CHANGES
CHANGES
+3
-0
bin/dig/dig.c
bin/dig/dig.c
+4
-1
bin/dig/dighost.c
bin/dig/dighost.c
+2
-0
bin/tests/system/digdelv/tests.sh
bin/tests/system/digdelv/tests.sh
+8
-0
No files found.
CHANGES
View file @
af2b20ee
4574. [bug] Dig leaked memory with multiple +subnet options.
[RT #44683]
4573. [func] Query logic has been substantially refactored (e.g.
query_find function has been split into smaller
functions) for improved readability, maintainability
...
...
bin/dig/dig.c
View file @
af2b20ee
...
...
@@ -1378,7 +1378,10 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
}
if
(
lookup
->
edns
==
-
1
)
lookup
->
edns
=
0
;
if
(
lookup
->
ecs_addr
!=
NULL
)
{
isc_mem_free
(
mctx
,
lookup
->
ecs_addr
);
lookup
->
ecs_addr
=
NULL
;
}
result
=
parse_netprefix
(
&
lookup
->
ecs_addr
,
value
);
if
(
result
!=
ISC_R_SUCCESS
)
fatal
(
"Couldn't parse client"
);
...
...
bin/dig/dighost.c
View file @
af2b20ee
...
...
@@ -1096,6 +1096,8 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
isc_boolean_t
prefix_parsed
=
ISC_FALSE
;
char
buf
[
sizeof
(
"xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX/128"
)];
REQUIRE
(
sap
!=
NULL
&&
*
sap
==
NULL
);
if
(
strlcpy
(
buf
,
value
,
sizeof
(
buf
))
>=
sizeof
(
buf
))
fatal
(
"invalid prefix '%s'
\n
"
,
value
);
...
...
bin/tests/system/digdelv/tests.sh
View file @
af2b20ee
...
...
@@ -269,6 +269,14 @@ if [ -x ${DIG} ] ; then
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
echo
"I:checking dig +subnet +subnet (
$n
)"
ret
=
0
$DIG
$DIGOPTS
+tcp @10.53.0.2 +subnet
=
127.0.0.0 +subnet
=
127.0.0.1 A a.example
>
dig.out.test
$n
2>&1
||
ret
=
1
grep
"CLIENT-SUBNET: 127.0.0.1/32/0"
< dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
echo
"I:checking dig +subnet with various prefix lengths (
$n
)"
ret
=
0
...
...
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