|
|
@ -212,9 +212,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|
|
|
|
|
|
|
|
|
|
|
dpapimk->context = hc_strtoul ((const char *) context_pos, NULL, 10);
|
|
|
|
dpapimk->context = hc_strtoul ((const char *) context_pos, NULL, 10);
|
|
|
|
|
|
|
|
|
|
|
|
// division by 4 should be fine because contents_len is either 208 or 288
|
|
|
|
for (u32 i = 0; i < dpapimk->contents_len / 8; i++)
|
|
|
|
|
|
|
|
|
|
|
|
for (u32 i = 0; i < dpapimk->contents_len / 4; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dpapimk->contents[i] = hex_to_u32 ((const u8 *) &contents_pos[i * 8]);
|
|
|
|
dpapimk->contents[i] = hex_to_u32 ((const u8 *) &contents_pos[i * 8]);
|
|
|
|
|
|
|
|
|
|
|
@ -303,7 +301,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|
|
|
|
|
|
|
|
|
|
|
SID_tmp = (u8 *) hcmalloc ((SID_len + 1) * sizeof (u8));
|
|
|
|
SID_tmp = (u8 *) hcmalloc ((SID_len + 1) * sizeof (u8));
|
|
|
|
|
|
|
|
|
|
|
|
for (u32 i = 0; i < (SID_len / 4) + 1; i++)
|
|
|
|
for (u32 i = 0; i < (SID_len / 4); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
u8 hex[8] = { 0 };
|
|
|
|
u8 hex[8] = { 0 };
|
|
|
|
|
|
|
|
|
|
|
|