Skip to content
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

Make the isValidAbsolutePath function more secure by using strnlen #146

Merged
merged 2 commits into from
May 17, 2024

Conversation

eparshut
Copy link
Contributor

To make isValidAbsolutePath function more secure use the strnlen function instead of the strlen.
Calling the strlen function can potentially be unsafe. The strlen function calculates the length of a string by counting characters until it reaches a null character and if the string is not properly null-terminated then strlen will continue reading memory beyond the end of the string, which can lead to undefined behavior or a program crash.

@eparshut eparshut requested a review from ichepiga May 17, 2024 12:26
src/ittnotify/jitprofiling.c Show resolved Hide resolved
@eparshut eparshut merged commit e4995d9 into intel:master May 17, 2024
12 checks passed
@eparshut eparshut deleted the abs_path_security_fix branch May 21, 2024 21:25
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.

2 participants