Skip to content
Snippets Groups Projects
Commit 97d6bc96 authored by Thomas Sewell's avatar Thomas Sewell
Browse files

Clean up data-flow in resolveVAddr.

Initialise the 'ret' struct from a constant zero struct to ensure that no
uninitialised data is returned. Returning uninitialized data creates headaches
for binary verification.

This function is inlined in builds I have looked at, and the 'ret' struct is
never built, so this change has zero impact on the binary.
parent fb7dd823
No related branches found
No related tags found
No related merge requests found
......@@ -1677,11 +1677,13 @@ decodeARMFrameInvocation(word_t label, unsigned int length,
}
}
static const resolve_ret_t default_resolve_ret_t;
static resolve_ret_t
resolveVAddr(pde_t *pd, vptr_t vaddr)
{
pde_t *pde = lookupPDSlot(pd, vaddr);
resolve_ret_t ret;
resolve_ret_t ret = default_resolve_ret_t;
ret.valid = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment