Unverified Commit 1d222dfe authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14350 jfs: array-index-out-of-bounds fix in dtReadFirst

parents 67136914 89e85699
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3086,6 +3086,13 @@ static int dtReadFirst(struct inode *ip, struct btstack * btstack)

		/* get the leftmost entry */
		stbl = DT_GETSTBL(p);

		if (stbl[0] < 0 || stbl[0] > 127) {
			DT_PUTPAGE(mp);
			jfs_error(ip->i_sb, "stbl[0] out of bound\n");
			return -EIO;
		}

		xd = (pxd_t *) & p->slot[stbl[0]];

		/* get the child page block address */