-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
Line 561 in 496cf72
| 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
Labels
No labels