Fixed rare crash when accessing library import by name
The library name index may only be 8-bits.
This bug was not present in the previous implementation due to a bitmask
(0xFF) - see
ea99ba8e3b/src/xenia/kernel/util/xex2.cc (L272)
This commit is contained in:
@@ -285,7 +285,8 @@ int xe_xex2_read_header(const uint8_t* addr, const size_t length,
|
||||
library->version.value = src_library->version.value;
|
||||
library->min_version.value = src_library->version_min.value;
|
||||
|
||||
std::strncpy(library->name, string_table[src_library->name_index],
|
||||
std::strncpy(library->name,
|
||||
string_table[src_library->name_index % count],
|
||||
xe::countof(library->name));
|
||||
|
||||
library->record_count = src_library->count;
|
||||
|
||||
Reference in New Issue
Block a user