mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-31 09:33:06 +00:00
DSPDisassembler: fail when buffer too large
This commit is contained in:
parent
1d0185d7d5
commit
7dab92d8b5
@ -27,6 +27,12 @@ DSPDisassembler::DSPDisassembler(const AssemblerSettings& settings) : settings_(
|
||||
|
||||
bool DSPDisassembler::Disassemble(const std::vector<u16>& code, std::string& text)
|
||||
{
|
||||
if (code.size() > std::numeric_limits<u16>::max())
|
||||
{
|
||||
text.append("; code too large for 16-bit addressing\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (u16 pc = 0; pc < code.size();)
|
||||
{
|
||||
if (!DisassembleOpcode(code.data(), &pc, text))
|
||||
|
Loading…
x
Reference in New Issue
Block a user