diff options
author | Martijn Coenen <maco@google.com> | 2012-03-29 10:10:34 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-29 10:10:34 -0700 |
commit | 2b8c4b2f4bc578f76b6dc0da33ef3aab70f3ba64 (patch) | |
tree | 91fed4cceef650becd556a6959000757200c6a67 /src/com | |
parent | 28d3d2df015a44b293e648036ebfd609363158aa (diff) | |
parent | 791ab7ad5b2fafaa4587d9ba7fb0fe39a815f278 (diff) | |
download | packages_apps_nfc-2b8c4b2f4bc578f76b6dc0da33ef3aab70f3ba64.zip packages_apps_nfc-2b8c4b2f4bc578f76b6dc0da33ef3aab70f3ba64.tar.gz packages_apps_nfc-2b8c4b2f4bc578f76b6dc0da33ef3aab70f3ba64.tar.bz2 |
Merge "Don't crash on passing invalid data to NfcService."
Diffstat (limited to 'src/com')
-rwxr-xr-x | src/com/android/nfc/NfcService.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java index b046cfb..10cd1ad 100755 --- a/src/com/android/nfc/NfcService.java +++ b/src/com/android/nfc/NfcService.java @@ -1044,6 +1044,8 @@ public class NfcService extends Application implements DeviceHostListener { return ErrorCodes.ERROR_IO; } + if (msg == null) return ErrorCodes.ERROR_INVALID_PARAM; + if (tag.writeNdef(msg.toByteArray())) { return ErrorCodes.SUCCESS; } else { |