mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-18 14:40:06 +00:00
[BZ #4772]
* time/strptime_l.c (__strptime_internal): Silently ignore strftime modifiers and field width in recursive calls.
This commit is contained in:
parent
fa69dc9caf
commit
ae1ad762f0
@ -1,5 +1,9 @@
|
|||||||
2007-07-20 Jakub Jelinek <jakub@redhat.com>
|
2007-07-20 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
[BZ #4772]
|
||||||
|
* time/strptime_l.c (__strptime_internal): Silently ignore
|
||||||
|
strftime modifiers and field width in recursive calls.
|
||||||
|
|
||||||
* include/time.h (enum ptime_locale_status): Remove.
|
* include/time.h (enum ptime_locale_status): Remove.
|
||||||
(__strptime_internal): Remove decided and era_cnt arguments,
|
(__strptime_internal): Remove decided and era_cnt arguments,
|
||||||
add statep argument.
|
add statep argument.
|
||||||
|
@ -330,6 +330,18 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
|
|||||||
}
|
}
|
||||||
|
|
||||||
++fmt;
|
++fmt;
|
||||||
|
if (statep != NULL)
|
||||||
|
{
|
||||||
|
/* In recursive calls silently discard strftime modifiers. */
|
||||||
|
while (*fmt == '-' || *fmt == '_' || *fmt == '0'
|
||||||
|
|| *fmt == '^' || *fmt == '#')
|
||||||
|
++fmt;
|
||||||
|
|
||||||
|
/* And field width. */
|
||||||
|
while (*fmt >= '0' && *fmt <= '9')
|
||||||
|
++fmt;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef _NL_CURRENT
|
#ifndef _NL_CURRENT
|
||||||
/* We need this for handling the `E' modifier. */
|
/* We need this for handling the `E' modifier. */
|
||||||
start_over:
|
start_over:
|
||||||
|
Loading…
Reference in New Issue
Block a user