mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-06 17:46:51 +02:00
Fix a potential single byte overflow
This commit is contained in:
@@ -132,7 +132,7 @@ static const char *value_to_string(GB_gameboy_t *gb, uint16_t value, bool prefer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Avoid overflow */
|
/* Avoid overflow */
|
||||||
if (symbol && strlen(symbol->name) > 240) {
|
if (symbol && strlen(symbol->name) >= 240) {
|
||||||
symbol = NULL;
|
symbol = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ static const char *debugger_value_to_string(GB_gameboy_t *gb, value_t value, boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Avoid overflow */
|
/* Avoid overflow */
|
||||||
if (symbol && strlen(symbol->name) > 240) {
|
if (symbol && strlen(symbol->name) >= 240) {
|
||||||
symbol = NULL;
|
symbol = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user