diff options
author | Paul Stewart <pstew@google.com> | 2016-03-15 18:17:50 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-03-15 18:17:50 +0000 |
commit | d8cb19d3c7835afc76149ddeb91a74cf49e8f1ef (patch) | |
tree | f9fa030c0709cd3dd98baeb2b7be56b59bb17e19 /service | |
parent | 80fcd6da60c59a395c4154feae75d1015bc9691e (diff) | |
parent | e367514651d7f888dda870fb472eea6bcfd9ec5d (diff) |
Merge "Don't crash if no supported rates are given" into nyc-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/util/InformationElementUtil.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/util/InformationElementUtil.java b/service/java/com/android/server/wifi/util/InformationElementUtil.java index 03595d921..b341b4356 100644 --- a/service/java/com/android/server/wifi/util/InformationElementUtil.java +++ b/service/java/com/android/server/wifi/util/InformationElementUtil.java @@ -581,6 +581,7 @@ public class InformationElementUtil { // stripped off already // public void from(InformationElement ie) { + mValid = false; if (ie == null || ie.bytes == null) return; mLength = ie.bytes.length; ByteBuffer data = ByteBuffer.wrap(ie.bytes).order(ByteOrder.LITTLE_ENDIAN); @@ -723,7 +724,8 @@ public class InformationElementUtil { // stripped off already // public void from(InformationElement ie) { - if (ie == null || ie.bytes == null || ie.bytes.length > 8) { + mValid = false; + if (ie == null || ie.bytes == null || ie.bytes.length > 8 || ie.bytes.length < 1) { return; } ByteBuffer data = ByteBuffer.wrap(ie.bytes).order(ByteOrder.LITTLE_ENDIAN); |