Skip to content

Incorrect bounds check for externalClientList size validation - checking if size < 0 which is impossible for ArrayList #352

Description

@sgurivir

RepoIQ has identified a logical bug in LCSPrivacyClassImpl.java

if (this.externalClientList.size() < 0 || this.externalClientList.size() > 5)

Title: Potential optimization in _decode in map/map-impl/src/main/java/org/restcomm/protocols/ss7/map/service/mobility/subscriberManagement/LCSPrivacyClassImpl.java

Issue:
LLM based analysis has identified a potential issue.

Incorrect bounds check for externalClientList size validation - checking if size < 0 which is impossible for ArrayList

Impact: The validation logic is incorrect as ArrayList.size() can never be negative, making the lower bound check ineffective

Potential Solution: Change the condition to check if size < 1 instead of size < 0 to properly validate minimum count

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions