Validate path length against max path size#1855
Open
weebl2000 wants to merge 1 commit into
Open
Conversation
This was referenced Feb 26, 2026
ce99d64 to
8436732
Compare
8436732 to
6e1ef7b
Compare
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.
6e1ef7b to
6aa5fe0
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.
Try it here: https://mcimages.weebl.me?commitId=multipath-fixes