Guard deep link map parser against OOM via oversized input#66
Draft
Copilot wants to merge 5 commits into
Draft
Conversation
- Switch between English, German, Spanish, French, Korean, Chinese, Japanese, Polish and Portuguese (Brazil)
- Add constants: DEEPLINK_MAX_WIDTH=200, DEEPLINK_MAX_HEIGHT=200, DEEPLINK_MAX_CELLS=40000, DEEPLINK_MAX_ROBOTS=50, DEEPLINK_MAX_TARGETS=50 - Validate board dimensions before allocating grid in convertWebFormatToAppFormat - Validate robot count and target count before processing - Return null from convertWebFormatToAppFormat when limits are exceeded - Show Toast error and ignore the deep link in handleIntent on null return - Add deeplink_map_too_large string to all 9 language resource files Agent-Logs-Url: https://github.com/Eastcoast-Laboratories/Roboyard/sessions/0909791c-f81a-425c-b84a-00412f0eb8dc Co-authored-by: rubo77 <1591563+rubo77@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Eastcoast-Laboratories/Roboyard/sessions/0909791c-f81a-425c-b84a-00412f0eb8dc Co-authored-by: rubo77 <1591563+rubo77@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix OOM crash in deep link map parsing with size limits
Guard deep link map parser against OOM via oversized input
Apr 9, 2026
5681451 to
2607101
Compare
eecae00 to
e2cbf53
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Crafted
roboyard://open?data=...deep links with arbitrarily large board dimensions or excessive robot/target counts could cause anOutOfMemoryErrorinconvertWebFormatToAppFormat— a remote denial-of-service with no user interaction required.Changes
MainActivity.javawidth,height, andwidth × heightbefore allocating the grid; returnnullimmediately on violationnullas soon as the count exceeds its limit (fail-fast — no list over-allocation)handleIntenthandles thenullreturn: shows a localized Toast and drops the deep link silentlyString resources
deeplink_map_too_largeto all 9 language files (en,de,es,fr,ko,ja,zh,pl,pt-rBR)