u_debug_symbol: Use correct sizeof for DbgHelp

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16182>
This commit is contained in:
Jesse Natalie 2022-04-26 12:47:43 -07:00 committed by Marge Bot
parent d8024b2504
commit f51840d87c
1 changed files with 1 additions and 1 deletions

View File

@ -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) {