Commit f0c93974 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp/dwarf: Detect out of section sibling DIE information.

parent 34b06f87
...@@ -1244,6 +1244,12 @@ static BOOL dwarf2_read_one_debug_info(dwarf2_parse_context_t* ctx, ...@@ -1244,6 +1244,12 @@ static BOOL dwarf2_read_one_debug_info(dwarf2_parse_context_t* ctx,
if (dwarf2_find_attribute(ctx, di, DW_AT_sibling, &sibling) && if (dwarf2_find_attribute(ctx, di, DW_AT_sibling, &sibling) &&
traverse->data != ctx->module_ctx->sections[ctx->section].address + sibling.u.uvalue) traverse->data != ctx->module_ctx->sections[ctx->section].address + sibling.u.uvalue)
{ {
if (sibling.u.uvalue >= ctx->module_ctx->sections[ctx->section].size)
{
FIXME("cursor sibling after section end %s: 0x%lx 0x%x\n",
dwarf2_debug_ctx(ctx), sibling.u.uvalue, ctx->module_ctx->sections[ctx->section].size);
return FALSE;
}
WARN("setting cursor for %s to next sibling <0x%lx>\n", WARN("setting cursor for %s to next sibling <0x%lx>\n",
dwarf2_debug_traverse_ctx(traverse), sibling.u.uvalue); dwarf2_debug_traverse_ctx(traverse), sibling.u.uvalue);
traverse->data = ctx->module_ctx->sections[ctx->section].address + sibling.u.uvalue; traverse->data = ctx->module_ctx->sections[ctx->section].address + sibling.u.uvalue;
......
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