Skip to content

Function strlcpy_is_not_posix truncated the last character of every s…#79

Open
luna7111 wants to merge 1 commit into42paris:masterfrom
luna7111:master
Open

Function strlcpy_is_not_posix truncated the last character of every s…#79
luna7111 wants to merge 1 commit into42paris:masterfrom
luna7111:master

Conversation

@luna7111
Copy link
Copy Markdown

@luna7111 luna7111 commented Jul 26, 2025

Fixes #78
Function strlcpy_is_not_posix truncated the last character of every string it copied. Removed the "- 1" in the loop condition so it copies the entire string.

Refer to the issue for a more in-detail description.

My login is ldel-val, slack me if you need to talk about this PR :)

…tring it copied. Removed the "- 1" in the loop so it copies the entire string.
@froz42
Copy link
Copy Markdown
Member

froz42 commented Apr 16, 2026

Hello, could you clarify that was the concret effect of this bug ? in what mlx functions ?

@froz42 froz42 self-assigned this Apr 16, 2026
@froz42
Copy link
Copy Markdown
Member

froz42 commented Apr 16, 2026

ok just saw your issue, but i need to make sure this does not break other things

@luna7111
Copy link
Copy Markdown
Author

hey! it's been a while since i made this PR.

Seeing that you work at 42 Paris you must be very busy with other stuff so if you want me to take a better look at this and make tests for every call to this function just tell me, i have the time.

Sorry if the issue and/or the PR weren't detailed enough, thank you for taking the time to take a look at the issue.

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.

strlcpy_is_not_posix truncates valid data and causes crash in mlx_xpm_to_image

2 participants