Skip to content

Validate path length against max path size#1855

Open
weebl2000 wants to merge 1 commit into
meshcore-dev:devfrom
weebl2000:multipath-fixes
Open

Validate path length against max path size#1855
weebl2000 wants to merge 1 commit into
meshcore-dev:devfrom
weebl2000:multipath-fixes

Conversation

@weebl2000
Copy link
Copy Markdown
Contributor

@weebl2000 weebl2000 commented Feb 26, 2026

@weebl2000 weebl2000 force-pushed the multipath-fixes branch 2 times, most recently from ce99d64 to 8436732 Compare March 3, 2026 14:38
robekl added a commit to robekl/MeshCore that referenced this pull request Mar 23, 2026
Reimplements meshcore-dev/MeshCore PR meshcore-dev#1855 on top of 467959c for the 1.14.1 maintenance branch.

References:
PR: meshcore-dev#1855
Packet path encoding source: https://github.com/meshcore-dev/MeshCore/blob/467959cc3bfc884e5f3425caac89453a450151b6/src/Packet.cpp

Rationale:
This patch adds explicit MAX_PATH_SIZE bounds checks before copying reply paths and makes Packet::copyPath surface write failures for non-empty paths. The change is narrow, defensive, and directly reduces the risk of invalid path lengths turning into out-of-bounds copies or silent truncation bugs. It is a good fit for a maintenance branch because it hardens existing parsing logic without changing the on-wire format.
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