Re: [PATCH] drivers: staging: greybus: fix GPF issue in gb_camera_capture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 5/4/23 PM10:53, Dan Carpenter wrote:
On Thu, May 04, 2023 at 09:58:41PM +0800, Dongliang Mu wrote:
In gb_camera_capture(), it does not check the value of settings
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

Fixes: 3265edaf0d70 ("greybus: Add driver for the camera class protocol")
Signed-off-by: Dongliang Mu <dzm91@xxxxxxxxxxx>
No.  The original code is correct.  memcpy(p, NULL, 0); is allowed.

Oh, I see. This memcpy with src as NULL and len as zero is intended.

Thanks, Dan.

Sorry for the false alarm, guys.

I don't see a bug.

dan carpenter
greybus-dev mailing list -- greybus-dev@xxxxxxxxxxxxxxxx
To unsubscribe send an email to greybus-dev-leave@xxxxxxxxxxxxxxxx

[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux