Re: [PATCH 1/1] ipu3-imgu: Fix NULL pointer dereference in active selection access

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

 



On 9/7/22 22:01, Sakari Ailus wrote:
Hi Maximilian,

On Wed, Sep 07, 2022 at 03:44:44PM +0200, Maximilian Luz wrote:
Hi,

On Thu, 25 Aug 2022 22:03:51 +0300, Sakari Ailus  wrote:
What the IMGU driver did was that it first acquired the pointers to active
and try V4L2 subdev state, and only then figured out which one to use.

The problem with that approach and a later patch (see Fixes: tag) is that
as sd_state argument to v4l2_subdev_get_try_crop() et al is NULL, there is
now an attempt to dereference that.

Fix this.

Thank you for this fix, this however only addresses
imgu_subdev_get_selection(), but the issue is also present in
imgu_subdev_set_selection(). I assume that a similar fix is needed for that.
I've added a diff for that below. Feel free to squash that into your patch or
let me know if I should submit this separately.

I've already sent a PR that includes it. Could you send this one as a
patch, please?

Sure, I'll do that. I'll also follow Laurent's suggestions and introduce
get_crop()/get_compose() helpers as I think that might be a bit cleaner.

Regards,
Max



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux