mirror of
https://github.com/nfc-tools/libnfc.git
synced 2025-12-23 18:50:05 +00:00
Fix out-of-bounds access in nfc-mfultralight unveiled by coverity scan:
*** CID 1090333: Out-of-bounds access (OVERRUN)
This commit is contained in:
parent
bd92f74a58
commit
bb9babbeda
@ -4,6 +4,7 @@ Fixes:
|
||||
- Remove unreachable code
|
||||
- nfc_emulate_uid: cleaner exit on interrupt
|
||||
- Fix reporting of modulations and baud rates by nfc-scan-device -v
|
||||
- Fix out-of-bounds access in nfc-mfultralight
|
||||
|
||||
Improvements:
|
||||
- Allow ISO14443A to be used at higher baud rates
|
||||
|
||||
@ -168,7 +168,8 @@ write_card(void)
|
||||
// page (4 bytes). The Ultralight-specific Write command only
|
||||
// writes one page at a time.
|
||||
uiBlock = page / 4;
|
||||
memcpy(mp.mpd.abtData, mtDump.amb[uiBlock].mbd.abtData + ((page % 4) * 4), 16);
|
||||
memcpy(mp.mpd.abtData, mtDump.amb[uiBlock].mbd.abtData + ((page % 4) * 4), 4);
|
||||
memset(mp.mpd.abtData + 4, 0, 12);
|
||||
if (!nfc_initiator_mifare_cmd(pnd, MC_WRITE, page, &mp))
|
||||
bFailure = true;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user