Mesa (main): u_debug_symbol: Use correct sizeof for DbgHelp

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 2 17:43:19 UTC 2022


Module: Mesa
Branch: main
Commit: f51840d87c9808e3dfa0095a4096b5b7c0424695
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f51840d87c9808e3dfa0095a4096b5b7c0424695

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Tue Apr 26 12:47:43 2022 -0700

u_debug_symbol: Use correct sizeof for DbgHelp

Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16182>

---

 src/util/u_debug_symbol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/u_debug_symbol.c b/src/util/u_debug_symbol.c
index bf3e8e8150a..891b9543aa6 100644
--- a/src/util/u_debug_symbol.c
+++ b/src/util/u_debug_symbol.c
@@ -163,7 +163,7 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
    IMAGEHLP_LINE64 Line;
 
    memset(pSymbol, 0, sizeof *pSymbol);
-   pSymbol->SizeOfStruct = sizeof buffer;
+   pSymbol->SizeOfStruct = sizeof *pSymbol;
    pSymbol->MaxNameLen = sizeof buffer - offsetof(SYMBOL_INFO, Name);
 
    if (!g_bSymInitialized) {



More information about the mesa-commit mailing list