Skip to content

idl: Fix potential panic on external type resolution#2954

Merged
acheroncrypto merged 2 commits into
otter-sec:masterfrom
acheroncrypto:idl-fix-possible-panic-on-external-type-resolution
May 9, 2024
Merged

idl: Fix potential panic on external type resolution#2954
acheroncrypto merged 2 commits into
otter-sec:masterfrom
acheroncrypto:idl-fix-possible-panic-on-external-type-resolution

Conversation

@acheroncrypto

Copy link
Copy Markdown
Collaborator

Problem

find_path function used in non-Anchor external type resolution can potentially panic if the file we're looking for doesn't exist in any of the ancestors.

This can happen in rare cases such as the recursive external type resolution described in #2946.

Summary of changes

Rewrite the find_path function without a potential panic.

@vercel

vercel Bot commented May 9, 2024

Copy link
Copy Markdown

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added the idl related to the IDL, either program or client side label May 9, 2024
@acheroncrypto acheroncrypto merged commit 14309ea into otter-sec:master May 9, 2024
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idl related to the IDL, either program or client side

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant