Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit baeebf09 authored by Yida Wang's avatar Yida Wang
Browse files

seemp: check array index range



Check whether array index is within the bounds in
seemp_logk_get_bit_from_vector().

Change-Id: Idccf75736582b2390540f4d7b3351c018937186a
Signed-off-by: default avatarYida Wang <yidaw@codeaurora.org>
parent 094061db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -289,7 +289,7 @@ static bool seemp_logk_get_bit_from_vector(__u8 *pVec, __u32 index)
	unsigned int bit_num = index%8;
	unsigned char byte;

	if (DIV_ROUND_UP(index, 8) > MASK_BUFFER_SIZE)
	if (byte_num >= MASK_BUFFER_SIZE)
		return false;

	byte = pVec[byte_num];