On Sat Feb 11 14:32:00 2023 +0000, Jinoh Kang wrote:
else { /* LFH blocks do not use BLOCK_FLAG_PREV_FREE or back pointer */ next = (block_get_flags( block ) & BLOCK_FLAG_LFH) ? NULL : next_block( subheap, block ); } if (!err && next && (block_get_flags( next ) & BLOCK_FLAG_PREV_FREE)) err = "invalid next block flags"; if (!err && (block_get_flags( block ) & BLOCK_FLAG_PREV_FREE))
I think it makes the logic harder to follow. I'd prefer to leave any eventual refactoring to when (and if) we decide to validate LFH blocks more thoroughly.