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

Backport 3.6: zephyr: Add zero-len check for utf8_trunc #78286

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Sep 11, 2024

Backports #74949

Fixes: #77956
Fixes: #77957

The function did not check if the provided string had a zero
length before starting to truncate, which meant that last_byte_p
could possible have pointed to the value before the string.

Signed-off-by: Emil Gydesen <[email protected]>
@Thalley Thalley marked this pull request as ready for review September 11, 2024 12:46
@Thalley Thalley added the Backport Backport PR and backport failure issues label Sep 11, 2024
@nashif nashif changed the title Backport 74949 to v3.6 branch Backport 3.6: zephyr: Add zero-len check for utf8_trunc Sep 11, 2024
@Thalley
Copy link
Collaborator Author

Thalley commented Sep 11, 2024

The backport fails testing due to relying on some test functions added by #73841

Should I also backport the test functions, or should I just remove the test from the backport?

@Thalley
Copy link
Collaborator Author

Thalley commented Sep 13, 2024

@ceolin @henrikbrixandersen what do you suggest for the failing tests? Pull in the test dependencies, or remove the test?

ceolin
ceolin previously approved these changes Sep 13, 2024
@ceolin
Copy link
Member

ceolin commented Sep 13, 2024

@Thalley imho just the fix is enough.

@henrikbrixandersen
Copy link
Member

@ceolin @henrikbrixandersen what do you suggest for the failing tests? Pull in the test dependencies, or remove the test?

Either is fine by me, but the simpler solution would be to not backport the tests.

@Thalley
Copy link
Collaborator Author

Thalley commented Sep 16, 2024

Removed the test

@henrikbrixandersen henrikbrixandersen merged commit 2c2540e into zephyrproject-rtos:v3.6-branch Sep 18, 2024
17 checks passed
@Thalley Thalley deleted the backport-74949-to-v3.6-branch branch September 18, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Testsuite Testsuite area: Utilities Backport Backport PR and backport failure issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[backport] zephyr: Add zero-len check for utf8_trunc [Backport v3.6-branch] Failed to backport #74949
6 participants