Re: [PATCH] tree-walk: disallow overflowing modes
- From
Jeff King <peff@peff.net>
- Date
- Jan 22, 2023, 07:50 UTC
- Message-ID
- <Y8zquGar3rLyRdTp@coredump.intra.peff.net>
- In-Reply-To
- <d673fde7-7eb2-6306-86b6-1c1a4c988ee8@web.de>
On Sat, Jan 21, 2023 at 10:36:09AM +0100, René Scharfe wrote:
> When parsing tree entries, reject mode values that don't fit into an > unsigned int.
Seems reasonable. I don't think you can cause any interesting mischief here, but it's cheap to check, and finding data problems earlier rather than later is always good.
Should it be s/unsigned int/uint16_t/, though?
-Peff