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
Change-Id: I09ee3c734e9be38a35b1d48679d74e42e0432d78
(cherry picked from commit 09cb3b3dc46c8bab51346a4163b130857d806418)
1 file changed
tree: f5a303179ae8187a2a9283740cb160524e112ab2
  1. Android.mk
  2. CleanSpec.mk
  3. MODULE_LICENSE_APACHE2
  4. NOTICE
  5. halimpl/
  6. src/