From: Carlo Arenas Date: Wed, 07 Nov 2018 00:48:28 GMT Subject: Re: [PATCH 2/3] approxidate: handle pending number for "specials" Message-ID: In-Reply-To: <20181102052309.GB19234@sigill.intra.peff.net> On Thu, Nov 1, 2018 at 10:24 PM Jeff King wrote: > > static void date_yesterday(struct tm *tm, struct tm *now, int *num) > { > + *num = 0; the only caller (date_time) for this sends num = NULL, so this triggers a segfault. the only reference I could find to that apparently unused parameter comes from: 93cfa7c7a8 ("approxidate_careful() reports errorneous date string", 2010-01-26) and seems to indicate it is optional and therefore a check for NULL might make sense for all other cases Carlo