Skip to content

fix(secure-storage): handle large arrays in u8ToBase64 to avoid stack overflow#61

Open
DeMonkeyCoder wants to merge 1 commit intoPlasmoHQ:mainfrom
DeMonkeyCoder:fix/secure-storage-large-data
Open

fix(secure-storage): handle large arrays in u8ToBase64 to avoid stack overflow#61
DeMonkeyCoder wants to merge 1 commit intoPlasmoHQ:mainfrom
DeMonkeyCoder:fix/secure-storage-large-data

Conversation

@DeMonkeyCoder
Copy link
Copy Markdown

Passing an array with a length of around 2^16 or greater to the String.fromCharCode.apply method in a Chrome extension’s background script causes a RangeError: Maximum call stack size exceeded. In node.js and browser this limit is around 2^17. This PR addresses the stack overflow by slicing the data in u8ToBase64 into smaller chunks. Added a test case to verify large data handling in SecureStorage.

@DeMonkeyCoder DeMonkeyCoder force-pushed the fix/secure-storage-large-data branch from 4e5cd1e to 680309f Compare August 19, 2025 14:27
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.

1 participant