Unverified Commit 2b3383a3 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14482 nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()

parents 5953e362 d995417b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ static inline void nilfs_put_page(struct page *page)
 */
static unsigned int nilfs_last_byte(struct inode *inode, unsigned long page_nr)
{
	unsigned int last_byte = inode->i_size;
	u64 last_byte = inode->i_size;

	last_byte -= page_nr << PAGE_SHIFT;
	if (last_byte > PAGE_SIZE)