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
10cd4cf3
Commit
10cd4cf3
authored
Jan 08, 2001
by
Andreas Gustafsson
Browse files
several dynamic memory allocations used the size of the wrong structure
(which coincidentally had the same size as the right one)
parent
93a6dd9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/dig/dighost.c
View file @
10cd4cf3
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.1
79
2001/01/08 23:4
0:29 bwelling
Exp $ */
/* $Id: dighost.c,v 1.1
80
2001/01/08 23:4
4:09 gson
Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
...
...
@@ -640,8 +640,7 @@ setup_system(void) {
debug
(
"adding search %s"
,
ptr
);
search
=
isc_mem_allocate
(
mctx
,
sizeof
(
struct
dig_server
));
mctx
,
sizeof
(
*
search
));
if
(
search
==
NULL
)
fatal
(
"Memory "
"allocation "
...
...
@@ -664,8 +663,7 @@ setup_system(void) {
while
((
ptr
=
next_token
(
&
input
,
"
\t\r\n
"
))
!=
NULL
)
{
search
=
isc_mem_allocate
(
mctx
,
sizeof
(
struct
dig_server
));
mctx
,
sizeof
(
*
search
));
if
(
search
==
NULL
)
fatal
(
"Memory "
"allocation "
...
...
@@ -1293,7 +1291,7 @@ setup_lookup(dig_lookup_t *lookup) {
if
(
fixedsearch
!=
NULL
)
isc_mem_free
(
mctx
,
fixedsearch
);
fixedsearch
=
isc_mem_allocate
(
mctx
,
sizeof
(
struct
dig_server
));
sizeof
(
*
fixedsearch
));
if
(
fixedsearch
==
NULL
)
fatal
(
"Memory allocation failure in %s:%d"
,
__FILE__
,
__LINE__
);
...
...
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