On 2019/7/24 äå10:11, Jia-Ju Bai wrote:
In insert_inline_extent(), there is an if statement on line 181 to checkThis can only be hit with compressed_size > 0 and compressed_pages != NULL.
whether compressed_pages is NULL:
if (compressed_size && compressed_pages)
When compressed_pages is NULL, compressed_pages is used on line 215:
cpage = compressed_pages[i];
Thus, a possible null-pointer dereference may occur.
To fix this possible bug, compressed_pages is checked on line 214.
It would be better to have an extra ASSERT() to warn developers about
the impossible case.