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

aws: macos: prevent buffer overflow on address sanitier #7774

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/aws/flb_aws_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,8 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag,
flb_sds_destroy(tmp);
tmp = NULL;

/* A string no longer than S3_KEY_SIZE is created to store the formatted timestamp. */
key = flb_calloc(1, S3_KEY_SIZE * sizeof(char));
/* A string no longer than S3_KEY_SIZE + 1 is created to store the formatted timestamp. */
key = flb_calloc(1, (S3_KEY_SIZE + 1) * sizeof(char));
if (!key) {
goto error;
}
Expand Down
Loading