Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6df23609 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

range checking for tnf

Change-Id: Ie94acd598d3b8b349ffa98cef0f64ef8fa9f9612
parent b3c2d480
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -168,6 +168,10 @@ public class NdefRecord implements Parcelable {
            throw new IllegalArgumentException("Illegal null argument");
        }

        if (tnf < 0 || tnf > 0x07) {
            throw new IllegalArgumentException("TNF out of range " + tnf);
        }

        /* generate flag */
        byte flags = FLAG_MB | FLAG_ME;