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

Re: [PATCH] fuzz: add new oss-fuzz fuzzer for date.c / date.h

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 12, 2023, 12:39 UTC
Message-ID
<xmqq7cmnno1n.fsf@gitster.g>
In-Reply-To
<xmqqfs1bo6l4.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> As I used the first byte to fuzz dmtype and .local, let's use the
> next three bytes to allow feeding overly wild timezone values to the
> machinery and see what breaks, perhaps like so:
>
> 	tz = *data++; /* int tz; */
> 	tz = (tz << 8) | *data++;
> 	tz = (tz << 8) | *data++;
> 	size -= 3;

Just this part. As data points at unsigned char, the above would not give us any negative number. We'd need to sign-extend the 24-bit resulting value if we are going to adopt the above approach.

Previous: Junio C HamanoNext: Arthur Chan via GitGitGadget
Message 3 of 10 in “fuzz: add new oss-fuzz fuzzer for date.c / date.h”
  1. fuzz: add new oss-fuzz fuzzer for date.c / date.hArthur Chan via GitGitGadget, Nov 11, 2023
  2. Junio C HamanoNov 12, 2023
  3. Junio C HamanoNov 12, 2023
  4. fuzz: add new oss-fuzz fuzzer for date.c / date.hArthur Chan via GitGitGadget, Nov 13, 2023
  5. Jeff KingNov 13, 2023
  6. Junio C HamanoNov 13, 2023
  7. Junio C HamanoNov 13, 2023
  8. fuzz: add new oss-fuzz fuzzer for date.c / date.hArthur Chan via GitGitGadget, Nov 14, 2023
  9. Junio C HamanoNov 14, 2023
  10. fuzz: add new oss-fuzz fuzzer for date.c / date.hArthur Chan via GitGitGadget, Nov 17, 2023

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.