Merge "Address review feedback" into main

This commit is contained in:
Chiachang Wang 2024-01-19 00:48:08 +00:00 • committed by Gerrit Code Review
commit 8ceb02c541

View file

@ -180,7 +180,10 @@ public class InetDiagMessage extends NetlinkMessage {
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);
}