mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 22:05:21 +00:00
drivers/contactless/pn532: Fix potential overflow
Fixes a potential overflow where more than 16 bytes are written to the cmd_buffer. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
parent
5fcc358305
commit
984ef64428
1 changed files with 1 additions and 0 deletions
|
|
@ -794,6 +794,7 @@ bool pn532_set_rf_config(struct pn532_dev_s * dev,
|
|||
|
||||
pn532_frame_init(f, PN532_COMMAND_RFCONFIGURATION);
|
||||
f->data[1] = conf->cfg_item;
|
||||
DEBUGASSERT(conf->data_size <= 16);
|
||||
memcpy(&f->data[2], conf->config, conf->data_size);
|
||||
f->len += conf->data_size + 1;
|
||||
pn532_frame_finish(f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue