New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs: fuse: Avoid possible buffer overflow #66592
Merged
Merged
Conversation
This file contains 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
de-nordic
reviewed
Dec 18, 2023
Checks path's size before copying it to local variable. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
@de-nordic would you mind taking a look again ? |
de-nordic
reviewed
Jan 8, 2024
} | ||
|
||
memcpy(dir_path, path, len); | ||
dir_path[len] = '\0'; | ||
return strcmp(dirname(dir_path), "/") == 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some day I will fix this atrocity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
de-nordic
approved these changes
Jan 8, 2024
nashif
approved these changes
Jan 8, 2024
ceolin
added
backport v3.4-branch
Backport to the v3.4-branch
backport v3.5-branch
Backport to the v3.5-branch
labels
Feb 18, 2024
This was referenced Feb 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: File System
backport v2.7-branch
Request backport to the v2.7-branch
backport v3.4-branch
Backport to the v3.4-branch
backport v3.5-branch
Backport to the v3.5-branch
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.
Checks path's size before copying it to local variable.