fsck.f2fs: sanity check segno and blk_off when building curseg array
authorJin Qian <jinqian@google.com>
Thu, 27 Apr 2017 22:45:28 +0000 (15:45 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 27 Apr 2017 22:49:54 +0000 (15:49 -0700)
commit892e1542e745d1e504093487dc633b5ef8345be1
treefcf6107ffeead2f22ae1ac99414c2353459bd9cb
parentb79c3ba4ea9d1342dfd2ddcdcc28a1d5d90e43ce
fsck.f2fs: sanity check segno and blk_off when building curseg array

segno and blk_off were read from input image without sanity check. This
could lead to buffer overflow when accessing internal arrays like SIT
sentries and seg_entry cur_valid_map.

Signed-off-by: Jin Qian <jinqian@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/mount.c