pack-bitmap: miscellaneous mmap read hardening
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 22 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | pack-bitmap.c: hide bitmap internals in `read_u8()`pack-bitmap.c | +6 | 2 replies | |
| 2/6 | pack-bitmap.c: hide bitmap internals in `read_be32()`pack-bitmap.c | +4 | 0 replies | |
| 3/6 | pack-bitmap.c: drop unnecessary 'inline'spack-bitmap.c | +2 | 1 reply | |
| 4/6 | pack-bitmap.c: factor out manual `map_pos` manipulationpack-bitmap.c | +22 | 8 replies | |
| 5/6 | pack-bitmap.c: use `bitmap_index_seek()` where possiblepack-bitmap.c | +13 | 7 replies | |
| 6/6 | pack-bitmap.c: factor out `bitmap_index_seek_commit()`pack-bitmap.c | +18 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] pack-bitmap: miscellaneous mmap read hardening
This short series has a few minor refactorings and hardenings I noticed while reading the pack-bitmap.c code recently.
The series is structured as follows:
- The first three are cleanups to the read_be32() and read_u8() functions that could be taken on their own.
- The last three replace manually reading from bitmap_git->map and adjusting bitmap_git->map_pos accordingly with a new bitmap_index_seek() wrapper that accomplishes the same with additional bounds- and overflow-checking.
Thanks in advance for your review.
Taylor Blau (6):
pack-bitmap.c: hide bitmap internals in read_u8() pack-bitmap.c: hide bitmap internals in read_be32() pack-bitmap.c: drop unnecessary 'inline's pack-bitmap.c: factor out manual map_pos manipulation pack-bitmap.c: use bitmap_index_seek() where possible pack-bitmap.c: factor out bitmap_index_seek_commit()
pack-bitmap.c | 84 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 59 insertions(+), 25 deletions(-)
Signature · 1 line
2.40.0.77.gd564125b3f