From: Junio C Hamano <gitster@pobox.com>
To: "Arthur Chan via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Arthur Chan <arthur.chan@adalogics.com>
Subject: Re: [PATCH] fuzz: add new oss-fuzz fuzzer for date.c / date.h
Date: Sun, 12 Nov 2023 21:39:32 +0900 [thread overview]
Message-ID: <xmqq7cmnno1n.fsf@gitster.g> (raw)
In-Reply-To: <xmqqfs1bo6l4.fsf@gitster.g> (Junio C. Hamano's message of "Sun, 12 Nov 2023 14:59:03 +0900")
Junio C Hamano <gitster@pobox.com> writes:
> 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.
next prev parent reply other threads:[~2023-11-12 12:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-11 17:39 [PATCH] fuzz: add new oss-fuzz fuzzer for date.c / date.h Arthur Chan via GitGitGadget
2023-11-12 5:59 ` Junio C Hamano
2023-11-12 12:39 ` Junio C Hamano [this message]
2023-11-13 16:22 ` [PATCH v2] " Arthur Chan via GitGitGadget
2023-11-13 18:35 ` Jeff King
2023-11-13 23:27 ` Junio C Hamano
2023-11-13 23:27 ` Junio C Hamano
2023-11-14 10:53 ` [PATCH v3] " Arthur Chan via GitGitGadget
2023-11-14 17:03 ` Junio C Hamano
2023-11-17 17:47 ` [PATCH v4] " Arthur Chan via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7cmnno1n.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=arthur.chan@adalogics.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.