commit | 12b002deaf34b0f223597208a7cd985cbe979b5c | [log] [tgz] |
---|---|---|
author | Chiachang Wang <chiachangwang@google.com> | Thu Jan 18 06:18:44 2024 +0000 |
committer | Chiachang Wang <chiachangwang@google.com> | Thu Jan 18 06:21:12 2024 +0000 |
tree | 37b0cb770ac9448f9c2188eaee51ee62eec95b0f | |
parent | 28a0f3457fe44318214fc8ac9c244150b824b6de [diff] |
Address review feedback This commit addresses the review feeback of aosp/2864606 to add a wtf log for unexpected cases. Bug: 320842025 Test: m Change-Id: I1581b0e754b74aac72278a0db61d9836618d50b5
diff --git a/staticlibs/device/com/android/net/module/util/netlink/InetDiagMessage.java b/staticlibs/device/com/android/net/module/util/netlink/InetDiagMessage.java index 1a326b5..b980c7d 100644 --- a/staticlibs/device/com/android/net/module/util/netlink/InetDiagMessage.java +++ b/staticlibs/device/com/android/net/module/util/netlink/InetDiagMessage.java
@@ -180,7 +180,10 @@ while (payload.position() < payloadLength) { final StructNlAttr attr = StructNlAttr.parse(payload); // Stop parsing for truncated or malformed attribute - if (attr == null) return null; + if (attr == null) { + Log.wtf(TAG, "Got truncated or malformed attribute"); + return null; + } msg.nlAttrs.add(attr); }