Skip to content

Svace fix #224

@artemov34

Description

@artemov34

if ref.String() != "" {

The current implementation may cause a nil pointer dereference at line 561. Even though ref was compared to nil earlier, there is no guarantee that it is non-nil at this point. Calling ref.String() or dereferencing *ref without checking can lead to a runtime panic (invalid memory address or nil pointer dereference).

To prevent this, the code should explicitly check ref != nil before using it. This makes the logic safe and avoids potential crashes at runtime.

if ref != nil && ref.String() != "" { transitiveResolver := resolver.transitiveResolver(basePath, *ref) basePath = resolver.updateBasePath(transitiveResolver, basePath) resolver = transitiveResolver }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions