fix buffer overflow.
This commit is contained in:
parent
5133491c2c
commit
1070d9bfde
1 changed files with 1 additions and 1 deletions
|
@ -742,7 +742,7 @@ mifare_desfire_get_file_settings (MifareTag tag, uint8_t file_no, struct mifare_
|
||||||
DESFIRE_TRANSCEIVE (tag, cmd, res);
|
DESFIRE_TRANSCEIVE (tag, cmd, res);
|
||||||
|
|
||||||
struct mifare_desfire_raw_file_settings raw_settings;
|
struct mifare_desfire_raw_file_settings raw_settings;
|
||||||
memcpy (&raw_settings, res, BUFFER_SIZE (res));
|
memcpy (&raw_settings, res, BUFFER_SIZE (res)-1);
|
||||||
|
|
||||||
settings->file_type = raw_settings.file_type;
|
settings->file_type = raw_settings.file_type;
|
||||||
settings->communication_settings = raw_settings.communication_settings;
|
settings->communication_settings = raw_settings.communication_settings;
|
||||||
|
|
Loading…
Add table
Reference in a new issue