From: Eric Sunshine Date: Tue, 01 Dec 2020 21:16:11 GMT Subject: Re: [PATCH v2 2/2] banned.h: mark ctime_r() and asctime_r() as banned. Message-ID: In-Reply-To: <20201201211138.33850-2-gitster@pobox.com> On Tue, Dec 1, 2020 at 4:12 PM Junio C Hamano wrote: > The ctime_r() and asctime_r() functions are reentrant, but have > no check that the buffer we pass in is long enough (the manpage says it > "should have room for at least 26 bytes"). Since this is such an > easy-to-get-wrong interface, and since we have the much safer stftime() > as well as its more conveinent strbuf_addftime() wrapper, let's ban both > of those. This still needs a s/conveinent/convenient/ mentioned earlier[1]. [1]: https://lore.kernel.org/git/CAPig+cT=gMEuKkbJefT9yxWWB5VC1fj6T+ofjn_saEEeEeU_MA@mail.gmail.com/