diff --git a/aaa4j-radius-core/src/main/java/org/aaa4j/radius/core/packet/PacketCodec.java b/aaa4j-radius-core/src/main/java/org/aaa4j/radius/core/packet/PacketCodec.java index 3ef4a08..73ef4de 100644 --- a/aaa4j-radius-core/src/main/java/org/aaa4j/radius/core/packet/PacketCodec.java +++ b/aaa4j-radius-core/src/main/java/org/aaa4j/radius/core/packet/PacketCodec.java @@ -545,13 +545,15 @@ private List> decodeAttributes(CodecContext codecContext, List attributeDefinition = dictionary.getAttributeDefinition(nextType); - int numComplete = attributeDefinition.getAttributeCodec().decode(codecContext, attributeStack); + if (attributeDefinition != null) { + int numComplete = attributeDefinition.getAttributeCodec().decode(codecContext, attributeStack); - for (int i = 0; i < numComplete; i++) { - attributes.add(attributeStack.removeFirst()); - } + for (int i = 0; i < numComplete; i++) { + attributes.add(attributeStack.removeFirst()); + } - continue; + continue; + } } attributes.add(attributeStack.removeFirst());