Thread (10 messages) 10 messages, 2 authors, 2024-10-07
STALE619d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 0/3] cache-tree: fix segfaults with invalid cache-trees

From: Patrick Steinhardt <hidden>
Date: 2024-09-17 07:13:09

Hi,

this small patch series fixes segfaults that can happen when the index
has a corrupted cache-tree extension. This scenario is covered by t4058,
which documented this segfault. I've noitced that this triggers the leak
sanitizer, so I've decided to fix these segfaults now and handle them
gracefully.

Patrick

Patrick Steinhardt (3):
  cache-tree: refactor verification to return error codes
  cache-tree: detect mismatching number of index entries
  unpack-trees: detect mismatching number of cache-tree/index entries

 cache-tree.c               | 102 ++++++++++++++++++++++++++-----------
 cache-tree.h               |   2 +-
 read-cache.c               |   5 +-
 t/t4058-diff-duplicates.sh |  19 ++++---
 unpack-trees.c             |  12 +++--
 5 files changed, 97 insertions(+), 43 deletions(-)

-- 
2.46.0.551.gc5ee8f2d1c.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help