Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joshua Root
libaacs
Commits
69e289a6
Commit
69e289a6
authored
Feb 09, 2016
by
npzacs
Browse files
aacs_get_mk(): do not return garbage if calculation failed
parent
9560a66e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libaacs/aacs.c
View file @
69e289a6
...
@@ -1317,7 +1317,10 @@ const uint8_t *aacs_get_mk(AACS *aacs)
...
@@ -1317,7 +1317,10 @@ const uint8_t *aacs_get_mk(AACS *aacs)
if
(
!
memcmp
(
aacs
->
mk
,
empty_key
,
sizeof
(
aacs
->
mk
)))
{
if
(
!
memcmp
(
aacs
->
mk
,
empty_key
,
sizeof
(
aacs
->
mk
)))
{
config_file
*
cf
=
keydbcfg_config_load
(
NULL
);
config_file
*
cf
=
keydbcfg_config_load
(
NULL
);
if
(
cf
)
{
if
(
cf
)
{
_calc_mk
(
aacs
,
aacs
->
mk
,
cf
->
pkl
,
cf
->
dkl
);
uint8_t
mk
[
16
]
=
{
0
};
if
(
_calc_mk
(
aacs
,
mk
,
cf
->
pkl
,
cf
->
dkl
)
==
AACS_SUCCESS
)
{
memcpy
(
aacs
->
mk
,
mk
,
16
);
}
keydbcfg_config_file_close
(
cf
);
keydbcfg_config_file_close
(
cf
);
}
}
...
...
Write
Preview
Supports
Markdown
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