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

Commit d52c796d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpp: Add error handling for invalid frame length in cpp frame info"

parents de80e0b1 e86478fe
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2332,6 +2332,13 @@ static struct msm_cpp_frame_info_t *get_64bit_cpp_frame_from_compat(
	/* Convert the 32 bit pointer to 64 bit pointer */
	new_frame->cookie = compat_ptr(new_frame32->cookie);
	cpp_cmd_msg_64bit = compat_ptr(new_frame32->cpp_cmd_msg);
	if ((new_frame->msg_len == 0) ||
		(new_frame->msg_len > MSM_CPP_MAX_FRAME_LENGTH)) {
		pr_err("%s:%d: Invalid frame len:%d\n", __func__,
			__LINE__, new_frame->msg_len);
		goto strip_err;
	}

	cpp_frame_msg = kzalloc(sizeof(uint32_t)*new_frame->msg_len,
		GFP_KERNEL);
	if (!cpp_frame_msg) {