mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
readmem (ARM): boundary check against end of addressable space
This commit is contained in:
parent
6524c7ada7
commit
ebdd30e92c
2 changed files with 6 additions and 0 deletions
|
@ -2393,6 +2393,9 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||||
} else {
|
} else {
|
||||||
// Allow reading from any memory address and length in special 'raw' mode.
|
// Allow reading from any memory address and length in special 'raw' mode.
|
||||||
base = NULL;
|
base = NULL;
|
||||||
|
// Boundary check against end of addressable space.
|
||||||
|
if (offset > 0)
|
||||||
|
count=MIN(count, -offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isok) {
|
if (isok) {
|
||||||
|
|
|
@ -186,6 +186,9 @@ static void UsbPacketReceived(uint8_t *packet) {
|
||||||
} else {
|
} else {
|
||||||
// Allow reading from any memory address and length in special 'raw' mode.
|
// Allow reading from any memory address and length in special 'raw' mode.
|
||||||
base = NULL;
|
base = NULL;
|
||||||
|
// Boundary check against end of addressable space.
|
||||||
|
if (offset > 0)
|
||||||
|
count=MIN(count, -offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isok) {
|
if (isok) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue