Joris Huizer : dbghelp: dwarf2_get_cpp_name: fix off-by-one error.
Alexandre Julliard
julliard at winehq.org
Thu Mar 10 11:30:24 CST 2011
Module: wine
Branch: master
Commit: a2793d62ade0ecc0026cf285f4b71506ab6bdcbf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a2793d62ade0ecc0026cf285f4b71506ab6bdcbf
Author: Joris Huizer <joris_huizer at yahoo.com>
Date: Wed Mar 9 22:57:19 2011 +0100
dbghelp: dwarf2_get_cpp_name: fix off-by-one error.
---
dlls/dbghelp/dwarf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 8714c90..e78026f 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -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
More information about the wine-cvs
mailing list