From: Ulrich Drepper Date: Sat, 28 Jul 2007 19:10:22 +0000 (+0000) Subject: [BZ #4772] X-Git-Tag: upstream/2.30~14841 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae1ad762f0687afb37761085cb6e83305afe4521;p=external%2Fglibc.git [BZ #4772] * time/strptime_l.c (__strptime_internal): Silently ignore strftime modifiers and field width in recursive calls. --- diff --git a/ChangeLog b/ChangeLog index b2d9424..c591d31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-07-20 Jakub Jelinek + [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. (__strptime_internal): Remove decided and era_cnt arguments, add statep argument. diff --git a/time/strptime_l.c b/time/strptime_l.c index 0305fd5..59a557c 100644 --- a/time/strptime_l.c +++ b/time/strptime_l.c @@ -330,6 +330,18 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) } ++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 /* We need this for handling the `E' modifier. */ start_over: