mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
readmem (ARM): boundary check against end of addressable space
This commit is contained in:
@@ -2393,6 +2393,9 @@ static void PacketReceived(PacketCommandNG *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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user