squashfs: fix divide error

The problem was in calculate_skip() function.

	int skip = calculate_skip(i_size_read(inode) >> msblk->block_log);

i_size_read(inode) and msblk->block_log are unsigned integers,
but calculate_skip had a signed int as argument. This cast led
to wrong skip value and then to divide by zero bug.

Reported-by: syzbot+e8f781243ce16ac2f962@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Change-Id: I0b592e8934435fc85c3c5120019d59f26ac8302a
1 file changed