mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
* strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
&& HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[].
This commit is contained in:
1 parent
b6f7c33a38
commit
2f82566ff2
2 files changed
+10
No files matched your search
@@ -1,3 +1,12 @@
|
||||
2005-03-14 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
|
||||
&& HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
|
||||
to be nonzero so that we (and caller) can detect the difference
|
||||
between a valid zero-length expansion and an error return, even
|
||||
when the underlying strftime fails before writing anything into
|
||||
that location.
|
||||
|
||||
2005-03-11 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* getdate.c: Regenerate using bison-2.0.
|
||||
|
||||
@@ -776,6 +776,7 @@ my_strftime (CHAR_T *s, size_t maxsize, const CHAR_T *format,
|
||||
*u++ = modifier;
|
||||
*u++ = format_char;
|
||||
*u = '\0';
|
||||
ubuf[0] = '\1';
|
||||
len = strftime (ubuf, sizeof ubuf, ufmt, tp);
|
||||
if (len == 0 && ubuf[0] != '\0')
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user