This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix BZ 18985 out of bounds access in strftime


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]