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
8e73941f
Commit
8e73941f
authored
Nov 30, 2015
by
Mark Andrews
Browse files
4265. [bug] Address unchecked isc_mem_get calls. [RT #41187]
parent
89c5c74c
Changes
5
Show whitespace changes
Inline
Side-by-side
CHANGES
View file @
8e73941f
4265. [bug] Address unchecked isc_mem_get calls. [RT #41187]
4264. [bug] Check const of strchr/strrchr assignments match
4264. [bug] Check const of strchr/strrchr assignments match
argument's const status. [RT #41150]
argument's const status. [RT #41150]
...
...
lib/dns/openssldsa_link.c
View file @
8e73941f
...
@@ -78,6 +78,8 @@ openssldsa_createctx(dst_key_t *key, dst_context_t *dctx) {
...
@@ -78,6 +78,8 @@ openssldsa_createctx(dst_key_t *key, dst_context_t *dctx) {
UNUSED
(
key
);
UNUSED
(
key
);
sha1ctx
=
isc_mem_get
(
dctx
->
mctx
,
sizeof
(
isc_sha1_t
));
sha1ctx
=
isc_mem_get
(
dctx
->
mctx
,
sizeof
(
isc_sha1_t
));
if
(
sha1ctx
==
NULL
)
return
(
ISC_R_NOMEMORY
);
isc_sha1_init
(
sha1ctx
);
isc_sha1_init
(
sha1ctx
);
dctx
->
ctxdata
.
sha1ctx
=
sha1ctx
;
dctx
->
ctxdata
.
sha1ctx
=
sha1ctx
;
return
(
ISC_R_SUCCESS
);
return
(
ISC_R_SUCCESS
);
...
...
lib/dns/rdata.c
View file @
8e73941f
...
@@ -1784,6 +1784,9 @@ static isc_result_t
...
@@ -1784,6 +1784,9 @@ static isc_result_t
mem_tobuffer
(
isc_buffer_t
*
target
,
void
*
base
,
unsigned
int
length
)
{
mem_tobuffer
(
isc_buffer_t
*
target
,
void
*
base
,
unsigned
int
length
)
{
isc_region_t
tr
;
isc_region_t
tr
;
if
(
length
==
0U
)
return
(
ISC_R_SUCCESS
);
isc_buffer_availableregion
(
target
,
&
tr
);
isc_buffer_availableregion
(
target
,
&
tr
);
if
(
length
>
tr
.
length
)
if
(
length
>
tr
.
length
)
return
(
ISC_R_NOSPACE
);
return
(
ISC_R_NOSPACE
);
...
...
lib/dns/tkey.c
View file @
8e73941f
...
@@ -990,7 +990,7 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
...
@@ -990,7 +990,7 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
if
(
nonce
!=
NULL
)
if
(
nonce
!=
NULL
)
isc_buffer_usedregion
(
nonce
,
&
r
);
isc_buffer_usedregion
(
nonce
,
&
r
);
else
{
else
{
r
.
base
=
isc_mem_get
(
msg
->
mctx
,
0
)
;
r
.
base
=
NULL
;
r
.
length
=
0
;
r
.
length
=
0
;
}
}
tkey
.
error
=
0
;
tkey
.
error
=
0
;
...
@@ -1001,9 +1001,6 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
...
@@ -1001,9 +1001,6 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
RETERR
(
buildquery
(
msg
,
name
,
&
tkey
,
ISC_FALSE
));
RETERR
(
buildquery
(
msg
,
name
,
&
tkey
,
ISC_FALSE
));
if
(
nonce
==
NULL
)
isc_mem_put
(
msg
->
mctx
,
r
.
base
,
0
);
RETERR
(
dns_message_gettemprdata
(
msg
,
&
rdata
));
RETERR
(
dns_message_gettemprdata
(
msg
,
&
rdata
));
RETERR
(
isc_buffer_allocate
(
msg
->
mctx
,
&
dynbuf
,
1024
));
RETERR
(
isc_buffer_allocate
(
msg
->
mctx
,
&
dynbuf
,
1024
));
RETERR
(
dst_key_todns
(
key
,
dynbuf
));
RETERR
(
dst_key_todns
(
key
,
dynbuf
));
...
@@ -1234,12 +1231,10 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
...
@@ -1234,12 +1231,10 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
if
(
nonce
!=
NULL
)
if
(
nonce
!=
NULL
)
isc_buffer_usedregion
(
nonce
,
&
r2
);
isc_buffer_usedregion
(
nonce
,
&
r2
);
else
{
else
{
r2
.
base
=
isc_mem_get
(
rmsg
->
mctx
,
0
)
;
r2
.
base
=
NULL
;
r2
.
length
=
0
;
r2
.
length
=
0
;
}
}
RETERR
(
compute_secret
(
shared
,
&
r2
,
&
r
,
&
secret
));
RETERR
(
compute_secret
(
shared
,
&
r2
,
&
r
,
&
secret
));
if
(
nonce
==
NULL
)
isc_mem_put
(
rmsg
->
mctx
,
r2
.
base
,
0
);
isc_buffer_usedregion
(
&
secret
,
&
r
);
isc_buffer_usedregion
(
&
secret
,
&
r
);
result
=
dns_tsigkey_create
(
tkeyname
,
&
rtkey
.
algorithm
,
result
=
dns_tsigkey_create
(
tkeyname
,
&
rtkey
.
algorithm
,
...
...
lib/isc/md5.c
View file @
8e73941f
...
@@ -62,6 +62,8 @@ isc_md5_invalidate(isc_md5_t *ctx) {
...
@@ -62,6 +62,8 @@ isc_md5_invalidate(isc_md5_t *ctx) {
void
void
isc_md5_update
(
isc_md5_t
*
ctx
,
const
unsigned
char
*
buf
,
unsigned
int
len
)
{
isc_md5_update
(
isc_md5_t
*
ctx
,
const
unsigned
char
*
buf
,
unsigned
int
len
)
{
if
(
len
==
0U
)
return
;
RUNTIME_CHECK
(
EVP_DigestUpdate
(
ctx
,
RUNTIME_CHECK
(
EVP_DigestUpdate
(
ctx
,
(
const
void
*
)
buf
,
(
const
void
*
)
buf
,
(
size_t
)
len
)
==
1
);
(
size_t
)
len
)
==
1
);
...
...
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