[all-commits] [llvm/llvm-project] 784b74: [libc] Fix off by one error in strftime (#165711)
Marcell Leleszi via All-commits
all-commits at lists.llvm.org
Thu Oct 30 10:36:03 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 784b74c6ef8a7f6ffaa7ab250eb35696dd833426
https://github.com/llvm/llvm-project/commit/784b74c6ef8a7f6ffaa7ab250eb35696dd833426
Author: Marcell Leleszi <59964679+mleleszi at users.noreply.github.com>
Date: 2025-10-30 (Thu, 30 Oct 2025)
Changed paths:
M libc/src/time/strftime.cpp
M libc/src/time/strftime_l.cpp
M libc/test/src/time/strftime_test.cpp
Log Message:
-----------
[libc] Fix off by one error in strftime (#165711)
This patch fixes a bug in strftime's return value when the formatted
output exactly fills the buffer, not including the null terminator. The
previous check failed to account for the null terminator in this case,
incorrectly returning the written count instead of 0.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list