"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes: >> I can think of three possible approaches: >> >> * Allocate with a margin (GIT_MAX_RAWSZ - the_hash_algo->rawsz) where >> "necessary" (TM). Maybe not so maintainable. > > I think there are actually several places where we allocate for these > buffers, so this is not likely to be a great solution. Even worse, in > some cases, we intentionally use a too-short buffer knowing that we'll > never dereference the data. > >> * Teach `oidset_insert()` (i.e., khash) to only copy >> `the_hash_algo->rawsz` bytes. Maybe not so good for performance. > > This is probably the best fix for the moment if you want an immediate > fix. > > As for my series, I'll need to run the testsuite on it, but I'll try to > get it out tonight or at the latest tomorrow if people want to use that > instead. Thanks.