This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix BZ 18985 out of bounds access in strftime
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>, Martin Sebor <msebor at gmail dot com>
- Date: Sun, 20 Sep 2015 09:55:08 -0700
- Subject: Re: [patch] Fix BZ 18985 out of bounds access in strftime
- Authentication-results: sourceware.org; auth=none
- References: <CAPC3xao-5YF_icBWE5yYbaYiUmiAvmb7w9s_G-dqawsx7eoTkQ at mail dot gmail dot com> <55FE5473 dot 7030305 at cs dot ucla dot edu>
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