Skip to content

Conversation

@adrian-niculescu
Copy link
Contributor

@adrian-niculescu adrian-niculescu commented Nov 20, 2025

Affects @nativescript/ios version 9.0.0.

Two locations in ModuleInternal.mm were using substr() without checking if the source string was long enough, leading to crashes when parentDir or path was shorter than ApplicationPath.

We encountered this crash in our use of the runtime when loading modules from paths that didn't follow the expected structure.

@adrian-niculescu adrian-niculescu changed the title Fix crash from unsafe substr operations on path strings fix: crash from unsafe substr operations on path strings Nov 20, 2025
Copy link
Contributor

@NathanWalker NathanWalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@NathanWalker NathanWalker merged commit fd2703d into NativeScript:main Nov 21, 2025
3 checks passed
@adrian-niculescu adrian-niculescu deleted the fix-path-substr-crash branch November 21, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants