Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jean-Baptiste Kempf
libaacs
Commits
9f3f7405
Commit
9f3f7405
authored
Jan 11, 2016
by
npzacs
Browse files
Check calloc() result
parent
972679a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/file/keydbcfg.c
View file @
9f3f7405
...
...
@@ -612,6 +612,9 @@ static int _parse_embedded(config_file *cf)
for
(
jj
=
sizeof
(
internal_dk_list
)
/
sizeof
(
internal_dk_list
[
0
])
-
1
;
jj
>=
0
;
--
jj
)
{
dk_list
*
e
=
calloc
(
1
,
sizeof
(
dk_list
));
if
(
!
e
)
break
;
decrypt_key
(
e
->
key
,
internal_dk_list
[
jj
],
16
);
e
->
node
=
internal_device_number
;
e
->
uv
=
MKINT_BE32
(
internal_dk_list
[
jj
]
+
16
);
...
...
@@ -630,6 +633,9 @@ static int _parse_embedded(config_file *cf)
for
(
ii
=
0
;
ii
<
sizeof
(
internal_pk_list
)
/
sizeof
(
internal_pk_list
[
0
]);
ii
++
)
{
pk_list
*
e
=
calloc
(
1
,
sizeof
(
pk_list
));
if
(
!
e
)
break
;
decrypt_key
(
e
->
key
,
internal_pk_list
[
ii
],
16
);
if
(
_is_duplicate_pk
(
cf
->
pkl
,
e
->
key
))
{
...
...
@@ -645,6 +651,9 @@ static int _parse_embedded(config_file *cf)
for
(
ii
=
0
;
ii
<
sizeof
(
internal_hc_list
)
/
sizeof
(
internal_hc_list
[
0
]);
ii
++
)
{
cert_list
*
e
=
calloc
(
1
,
sizeof
(
cert_list
));
if
(
!
e
)
break
;
decrypt_key
(
e
->
host_priv_key
,
internal_hc_list
[
ii
],
20
);
decrypt_key
(
e
->
host_cert
,
internal_hc_list
[
ii
]
+
20
,
92
);
...
...
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