Re: [PATCH 2/3] approxidate: handle pending number for "specials"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 1, 2018 at 10:24 PM Jeff King <peff@xxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux