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

Commit c202494e authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: jpeg: Fix unvalidated dev_type" into dev/msm-4.9-camx

parents 6c2e1c1a 1bee493b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -826,6 +826,11 @@ static int cam_jpeg_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
	ctx_data->jpeg_dev_acquire_info = jpeg_dev_acquire_info;
	mutex_unlock(&ctx_data->ctx_mutex);

	if (ctx_data->jpeg_dev_acquire_info.dev_type >=
		CAM_JPEG_RES_TYPE_MAX) {
		rc = -EINVAL;
		goto acq_cdm_hdl_failed;
	}
	dev_type = ctx_data->jpeg_dev_acquire_info.dev_type;
	if (!hw_mgr->cdm_info[dev_type][0].ref_cnt) {