On Thu, May 04, 2023 at 09:58:41PM +0800, Dongliang Mu wrote:
In gb_camera_capture(), it does not check the value of settingsNo. The original code is correct. memcpy(p, NULL, 0); is allowed.
before dereferencing it. And gb_camera_debugfs_capture calls
gb_camera_capture with the 6th parameter settings as NULL.
Fix this by checking the value of setting at the starting of
gb_camera_capture.
Fixes: 3265edaf0d70 ("greybus: Add driver for the camera class protocol")
Signed-off-by: Dongliang Mu <dzm91@xxxxxxxxxxx>
---
I don't see a bug.
regards,
dan carpenter