Re: [PATCH] squash! reftable: reading/writing blocks
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Oct 7, 2021, 16:34 UTC
- Message-ID
- <CAFQ2z_PoRTOZDmZyWObeL3CC4Y5SvJhaVAMfkV-nT4NnMdL6zQ@mail.gmail.com>
- In-Reply-To
- <20210930122352.26505-1-carenas@gmail.com>
On Thu, Sep 30, 2021 at 2:24 PM Carlo Marcelo Arenas Belón <carenas@gmail.com> wrote:
> Avoid a possible infinite loop in platforms where size_t > long > by using instead the required type and checking for overflow > before doubling.
Thanks for your attention to detail. Folded in.
I think the loop is rather hypothetical, though: the block size is limited to 2²⁴, so I think you can´t make blocks that large.
-- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays. -- Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Halimah DeLaine Prado