- Prevent strftime to parsing format string beyond its end when it finish with "%E" or "%O". --- newlib/libc/time/strftime.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c index 56f227c5f..c4e9e45a9 100644 --- a/newlib/libc/time/strftime.c +++ b/newlib/libc/time/strftime.c @@ -754,6 +754,8 @@ __strftime (CHAR *s, size_t maxsize, const CHAR *format, switch (*format) { + case CQ('\0'): + break; case CQ('a'): _ctloc (wday[tim_p->tm_wday]); for (i = 0; i < ctloclen; i++) -- 2.42.1