We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the file programs/util.c, the function mallocAndJoin2Dir has the following code:
programs/util.c
mallocAndJoin2Dir
static char* mallocAndJoin2Dir(const char *dir1, const char *dir2) { const size_t dir1Size = strlen(dir1); const size_t dir2Size = strlen(dir2); char *outDirBuffer; ... outDirBuffer = (char *) malloc(dir1Size + dir2Size + 2); ... buffer = outDirBuffer + dir1Size; trailingChar = *(buffer - 1); }
When dir1Size=0 (i.e., dir1="" ), the buffer access *(buffer - 1) is out of bound.
dir1Size=0
dir1=""
*(buffer - 1)
The text was updated successfully, but these errors were encountered:
Can you provide an example that triggers this issue?
Sorry, something went wrong.
embg
Successfully merging a pull request may close this issue.
In the file
programs/util.c
, the functionmallocAndJoin2Dir
has the following code:When
dir1Size=0
(i.e.,dir1=""
), the buffer access*(buffer - 1)
is out of bound.The text was updated successfully, but these errors were encountered: