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

(RHEL-18768) time-util: fix buffer-over-run #422

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

brozs
Copy link
Collaborator

@brozs brozs commented Jan 15, 2024

Fixes #23928.

(cherry picked from commit 9102c625a673a3246d7e73d8737f3494446bad4e)

Note there is an existing backport commit (a521f94) in the rhel-8.8.0 branch but that has placed the following section in test_format_timespan() in src/test/test-time-util.c, thus calling the test asserts on each test_format_timespan() call, while I believe it is more appropriate in the main():

        /* See issue #23928. */
        _cleanup_free_ char *buf;
        assert_se(buf = new(char, 5));
        assert_se(buf == format_timespan(buf, 5, 100005, 1000));

Please advise.

Resolves: RHEL-18768

Fixes #23928.

(cherry picked from commit 9102c625a673a3246d7e73d8737f3494446bad4e)

Resolves: RHEL-18768
@github-actions github-actions bot added rhel-8.6.0 pr/needs-ci Formerly needs-ci pr/needs-review Formerly needs-review labels Jan 15, 2024
Copy link

github-actions bot commented Jan 15, 2024

Commit validation

Tracker - RHEL-18768

The following commits meet all requirements

commit upstream
b2c54cc - time-util: fix buffer-over-run systemd/systemd@9102c62

Tracker validation

Success

🟢 Tracker RHEL-18768 has set desired product: rhel-8.6.0.z
🟢 Tracker RHEL-18768 has set desired component: systemd
🟢 Tracker RHEL-18768 has been approved


Pull Request validation

Success

🟢 CI - All checks have passed
🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved


Auto Merge

Failed

🔴 Pull Request has unsupported target branch rhel-8.6.0, expected branches are: 'main,master'

Success

🟢 Pull Request is not marked as draft and it's not blocked by dont-merge label
🟢 Pull Request meet requirements, title has correct form
🟢 Pull Request meet requirements, mergeable is true
🟢 Pull Request meet requirements, mergeable_state is clean

@github-actions github-actions bot removed the pr/needs-ci Formerly needs-ci label Jan 15, 2024
@dtardon
Copy link
Member

dtardon commented Jan 16, 2024

Note there is an existing backport commit (a521f94) in the rhel-8.8.0 branch but that has placed the following section in test_format_timespan() in src/test/test-time-util.c, thus calling the test asserts on each test_format_timespan() call, while I believe it is more appropriate in the main():

I don't think it matters. Who cares if that particular check is done multiple times? If it took 5 minutes to finish, then it might have been a concern. But it doesn't...

Copy link
Member

@dtardon dtardon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added pr/needs-manual-merge and removed pr/needs-review Formerly needs-review labels Jan 16, 2024
@jamacku jamacku merged commit 93ee614 into redhat-plumbers:rhel-8.6.0 Jan 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants