From 55407d0edcad60e932e26232c9a47ea0eaa0e3e3 Mon Sep 17 00:00:00 2001 From: Sumalatha Malothu Date: Mon, 22 Jul 2019 13:47:49 +0530 Subject: msm:camera:isp: Fix array index bound checks Added check for max array index Change-Id: I4f8a4b559c83c04577cd58376526668d29b6b723 Signed-off-by: Sumalatha Malothu --- drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util_32.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util_32.c index 2eed3c077ff2..6dec6f8cb15c 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util_32.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util_32.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1214,7 +1214,7 @@ static void msm_isp_update_rdi_output_count( for (i = 0; i < stream_cfg_cmd->num_streams; i++) { if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) - > MAX_NUM_STREAM) + >= MAX_NUM_STREAM) return; stream_info = &axi_data->stream_info[ -- cgit v1.2.3