Commit a2793d62 authored by Joris Huizer's avatar Joris Huizer Committed by Alexandre Julliard

dbghelp: dwarf2_get_cpp_name: fix off-by-one error.

parent 08a4c861
......@@ -962,7 +962,7 @@ static const char* dwarf2_get_cpp_name(dwarf2_parse_context_t* ctx, dwarf2_debug
if (di->abbrev->tag == DW_TAG_compile_unit) return name;
if (!ctx->cpp_name)
ctx->cpp_name = pool_alloc(&ctx->pool, MAX_SYM_NAME);
last = ctx->cpp_name + MAX_SYM_NAME - strlen(name);
last = ctx->cpp_name + MAX_SYM_NAME - strlen(name) - 1;
strcpy(last, name);
/* if the di is a definition, but has also a (previous) declaration, then scope must
......
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