Commit a725d203 authored by Shreyas Narayan's avatar Shreyas Narayan
Browse files

Fix native crash in nfc_ncif_proc_activate

The destination of memcpy is allocated with a predetermined maximum
length, but in some cases the length of information being copied is
greater than the maximum length of the destination.
This is the root cause of crash.
Add length check before memcpy to avoid memory overflow
Test: Repeat reading and writing tag
Bug: 33434992
Bug: 32688507
(cherry picked from commit c67cc6ad2addddcb7185a33b08d27290ce54e350)

Change-Id: I2031917368ca85da2c9e58b990ddc11981655e08
parent 95cd6fa5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment