[patch] Fix BZ 18985 out of bounds access in strftime
Paul Pluzhnikov
ppluzhnikov@google.com
Sun Sep 20 16:55:00 GMT 2015
On Sat, Sep 19, 2015 at 11:38 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> tzcode strftime stores "?" for out-of-range tm_mon and tm_wday
... but formats the other values, e.g. it can print something like
memset (tp, 0, sizeof (*tp));
tp->tm_hour = 1024;
strftime(..., "%H %I", tp); // produces "1024 04"
that doesn't seem very desirable.
Anyway, I'll send a patch to eliminate just the crashes on OOB tm_mon
and tm_wday.
--
Paul Pluzhnikov
More information about the Libc-alpha
mailing list