mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
cppcheck complains about the dynamic_lock_Areas access. Might fix it
This commit is contained in:
parent
073b47d480
commit
4b0096c135
1 changed files with 7 additions and 2 deletions
|
@ -201,6 +201,11 @@ static bool topaz_byte_is_locked(uint16_t byteno) {
|
||||||
if (lock_area == NULL) {
|
if (lock_area == NULL) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
if ((lock_area->byte_offset - TOPAZ_STATIC_MEMORY) < 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
lockbits = &topaz_tag.dynamic_memory[lock_area->byte_offset - TOPAZ_STATIC_MEMORY];
|
lockbits = &topaz_tag.dynamic_memory[lock_area->byte_offset - TOPAZ_STATIC_MEMORY];
|
||||||
locked_bytes_per_bit = lock_area->bytes_locked_per_bit;
|
locked_bytes_per_bit = lock_area->bytes_locked_per_bit;
|
||||||
byteno = byteno - lock_area->first_locked_byte;
|
byteno = byteno - lock_area->first_locked_byte;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue