You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first line in the methods takes the *Policy from the extPolicy and then (unless it is nil) modifies and returns it.
However, the comment on the function states that a new policy would be created and returned.
Moreover, this appears to be the only function in this module that allows modifying existing policies.
I suspect the first line is wrong and should instead copy the policy object.
Is that a bug?
The text was updated successfully, but these errors were encountered:
I agree with you that it's pretty suspicious. It almost looks like extPolicy.Policy used to be a value and was changed to a pointer without sufficient consideration.
While porting the path policy language to JPAN, I came across this code in
private/path/pathpol/policy.go
:scion/private/path/pathpol/policy.go
Line 97 in 6e7f052
The first line in the methods takes the
*Policy
from theextPolicy
and then (unless it isnil
) modifies and returns it.However, the comment on the function states that a new policy would be created and returned.
Moreover, this appears to be the only function in this module that allows modifying existing policies.
I suspect the first line is wrong and should instead copy the policy object.
Is that a bug?
The text was updated successfully, but these errors were encountered: