Module: wine Branch: master Commit: e8777691c8b54f21339fcc268b3a916e8a55fd71 URL: https://gitlab.winehq.org/wine/wine/-/commit/e8777691c8b54f21339fcc268b3a916...
Author: Eric Pouech eric.pouech@gmail.com Date: Wed Feb 1 18:30:50 2023 +0100
winedump: Be stricter about sizes while walking module's list.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
---
tools/winedump/pdb.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c index 787a62fe624..b13161c6c7a 100644 --- a/tools/winedump/pdb.c +++ b/tools/winedump/pdb.c @@ -637,6 +637,9 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx /* Read per-module symbol / linenumber tables */ file = (const char*)symbols + sizeof(PDB_SYMBOLS); while (file - (const char*)symbols < sizeof(PDB_SYMBOLS) + symbols->module_size) + while ((file - (const char*)symbols + sizeof(symbols->version) < sizeof(PDB_SYMBOLS) + symbols->module_size) && + (file - (const char*)symbols + + symbols->version < 19970000 ? sizeof(PDB_SYMBOL_FILE) : sizeof(PDB_SYMBOL_FILE_EX)) < sizeof(PDB_SYMBOLS) + symbols->module_size) { int stream_nr, symbol_size, lineno_size, lineno2_size; const char* file_name;