From: Aniket Gupta Date: Tue, 20 Oct 2026 16:54:42 GMT Subject: Re: [PATCH] reftable/record: bound an object record's offset count by its length Message-ID: <20261020165442.59954-1-aniketgupta3001@gmail.com> In-Reply-To: Hi Matthew, > By fixing that one function we also implicitly fix all the other > callers that may currently be wrong. I tried Patrick's change on a 32 bit build and it works for REFTABLE_ALLOC_ARRAY. However REFTABLE_CALLOC_ARRAY goes straight to reftable_calloc() with a size_t and gets truncated. I think no one passes a 64 bit count to it so nothing breaks but maybe worth a mention in the commit message? Also the new test passes because of the count > in.len check. If that check goes away in v2 I think it might need a different test since on 64 bit nothing truncates. Maybe we can test reftable_alloc_size() directly? Aniket