Skip to content

Set errno when the strftime buffer is filled up before the format ends - #203

Open
mame wants to merge 1 commit into
masterfrom
date-strftime-full-buffer
Open

mame wants to merge 1 commit into
masterfrom
date-strftime-full-buffer

Conversation

@mame

@mame mame commented Nov 13, 2026

Copy link
Copy Markdown
Member

date_strftime_with_tmx returned 0 without setting errno when the output reached exactly maxsize - 1 with directives left, so date_strftime_alloc ended up in rb_sys_fail with errno == 0. Report ERANGE like the other out-of-room paths.

Reported-by: SunnyR (https://hackerone.com/sunny-r)

date_strftime_with_tmx returned 0 without setting errno when the
output reached exactly maxsize - 1 with directives left, so
date_strftime_alloc ended up in rb_sys_fail with errno == 0.
Report ERANGE like the other out-of-room paths.

Reported-by: SunnyR (https://hackerone.com/sunny-r)
Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant