Commit 5ff6b0d6 authored by npzacs's avatar npzacs
Browse files

DK uv value can not be 0

parent 2bb0fcc4
......@@ -634,7 +634,7 @@ static int _parse_embedded(config_file *cf)
e->uv = MKINT_BE32(internal_dk_list[jj] + 16);
e->u_mask_shift = internal_dk_list[jj][20];
if (_is_duplicate_dk(cf->dkl, e)) {
if (!e->uv || _is_duplicate_dk(cf->dkl, e)) {
X_FREE(e);
} else {
......
......@@ -209,6 +209,9 @@ static dk_list *_find_dk(dk_list *dkl, uint32_t *p_dev_key_v_mask, uint32_t uv,
/* wrong device */
continue;
}
if (!dkl->uv) {
continue;
}
key_idx++;
dev_key_uv = dkl->uv;
dev_key_u_mask = 0xffffffff << dkl->u_mask_shift;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment