Skip to content

Correct the executable path for osx#170

Merged
TrentHouliston merged 1 commit intomainfrom
houliston/macpath
Jan 25, 2025
Merged

Correct the executable path for osx#170
TrentHouliston merged 1 commit intomainfrom
houliston/macpath

Conversation

@TrentHouliston
Copy link
Member

on osx, the executable path was using the size variable, however this wasn't holding the number of bytes put in the buffer, it instead just is used to output the required size if there was not enough. As a result, the string had nulls in it. Later when it was concatenated with an extension for traces, the nulls meant that the final path was just the binary name which was overwritten.

since PATH_MAX is used as the buffer size, we don't need to look at the space required as it should be PATH_MAX or less by definition.

@TrentHouliston TrentHouliston merged commit 9eff97f into main Jan 25, 2025
13 of 14 checks passed
@TrentHouliston TrentHouliston deleted the houliston/macpath branch January 25, 2025 08:03
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