Merge pull request #1769 from mwalker33/ndef

mfu ndef error
This commit is contained in:
Iceman 2022-09-02 16:45:14 +02:00 committed by GitHub
commit b205908447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -3,7 +3,8 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased] ## [unreleased][unreleased]
- Changed spiffs write/apped to send in 8192 chucks to ensure its eraised (@mwalker) - Fixed buffer overflow in mfu ndef decode (@mwalker)
- Changed spiffs write/append to send in 8192 chunks to ensure its eraised (@mwalker)
- Fixed spiffs dump to ensure to fails correctly if no big_buff was allocated (@mwalker) - Fixed spiffs dump to ensure to fails correctly if no big_buff was allocated (@mwalker)
- Change Client Makefile to respect global flags (@blshkv) - Change Client Makefile to respect global flags (@blshkv)
- Change Makefile, honors global CC values (@blshkv) - Change Makefile, honors global CC values (@blshkv)

View file

@ -4027,6 +4027,9 @@ int CmdHF14MfuNDEFRead(const char *Cmd) {
} }
} }
// The following read will read in blocks of 16 bytes.
// ensure maxsize is rounded up to a multiple of 16
maxsize = maxsize + (16 - (maxsize % 16));
// allocate mem // allocate mem
uint8_t *records = calloc(maxsize, sizeof(uint8_t)); uint8_t *records = calloc(maxsize, sizeof(uint8_t));
if (records == NULL) { if (records == NULL) {