readmem (ARM): boundary check against end of addressable space

This commit is contained in:
Martijn Plak 2024-01-23 08:41:53 +01:00
commit ebdd30e92c
2 changed files with 6 additions and 0 deletions

View file

@ -186,6 +186,9 @@ static void UsbPacketReceived(uint8_t *packet) {
} else {
// Allow reading from any memory address and length in special 'raw' mode.
base = NULL;
// Boundary check against end of addressable space.
if (offset > 0)
count=MIN(count, -offset);
}
if (isok) {