git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Carlo Arenas <carenas@gmail.com>
Date
Nov 7, 2018, 00:48 UTC
Message-ID
<CAPUEspi12TtKxKGr=tutfLPNPWhaZmGCh7q4D1LRJ9LFTWwKNA@mail.gmail.com>
In-Reply-To
<20181102052309.GB19234@sigill.intra.peff.net>
On Thu, Nov 1, 2018 at 10:24 PM Jeff King <peff@peff.net> 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
Previous: Jeff KingNext: Jeff King
Message 4 of 7 in “mixed bag of -Wunused-parameter bugfixes”
  1. 0/3 mixed bag of -Wunused-parameter bugfixesJeff King, Nov 2, 2018
  2. 1/3 rev-list: handle flags for --indexed-objectsJeff King, Nov 2, 2018
  3. 2/3 approxidate: handle pending number for "specials"Jeff King, Nov 2, 2018
  4. Carlo ArenasNov 7, 2018
  5. Jeff KingNov 7, 2018
  6. Junio C HamanoNov 7, 2018
  7. 3/3 pathspec: handle non-terminated strings with :(attr)Jeff King, Nov 2, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.