Prevent allocation overflows by corrupt NDEF records.

Basic sanity check for the length fields in NdefRecord; this prevents
malformed NdefRecords from crashing the vm and the entire NFC service
with it.

Bug: 4165324
Change-Id: I67b341d445d6647cb76cc24ea49afaf77de0610e
1 file changed