Commit ceb11276 authored by Wang Hai's avatar Wang Hai
Browse files

drm/amd/display: Revert "drm/amd/display: Fix potential index out of bounds in...

drm/amd/display: Revert "drm/amd/display: Fix potential index out of bounds in color transformation function"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB10SX



--------------------------------

This reverts commit 09996a7c.

The reverted commit modified differently from the original stable due to a
bug in git am.

The original patch has been merged by CVE-2024-38552.

So revert this buggy patch.

Fixes: 09996a7c ("drm/amd/display: Fix potential index out of bounds in color transformation function")
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
parent ab4fcabb
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -571,11 +571,6 @@ bool cm_helper_translate_curve_to_degamma_hw_format(
				i += increment) {
			if (j == hw_points - 1)
				break;
			if (i >= TRANSFER_FUNC_POINTS) {
				DC_LOG_ERROR("Index out of bounds: i=%d, TRANSFER_FUNC_POINTS=%d\n",
					     i, TRANSFER_FUNC_POINTS);
				return false;
			}
			rgb_resulted[j].red = output_tf->tf_pts.red[i];
			rgb_resulted[j].green = output_tf->tf_pts.green[i];
			rgb_resulted[j].blue = output_tf->tf_pts.blue[i];