[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69825821-5b2c-44b1-b921-f077eedb3a71@ieee.org>
Date: Mon, 4 Mar 2024 07:30:04 -0600
From: Alex Elder <elder@...e.org>
To: Rui Miguel Silva <rmfrfs@...il.com>,
Mikhail Lobanov <m.lobanov@...alinux.ru>
Cc: greybus-dev@...ts.linaro.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [greybus-dev] [PATCH] greybus: Fix deref of NULL in
__gb_lights_flash_brightness_set
On 3/2/24 10:35 AM, Rui Miguel Silva wrote:
>> So anyway, I think this (and Dan's suggestion) should be
>> addressed, but your fix might not be correct.
>>
>> Rui, can you please shed some light on the situation?
> As we talked, this email was sent at the same time as my replies to
> this thread and you think I addressed your concerns in that replies.
> If not, just go ahead and ask again.
Yes.
You said the intention was to return null if not found
(rather than "the passed-in value as default"). So that
bug should be fixed. Dan says he'll re-send that.
Either way, even if it's practically impossible, the
get_channel_from_mode() *can* return NULL, therefore
__gb_lights_flash_brightness_set() should be fixed to
avoid dereferencing the return value in such a case.
-Alex
Powered by blists - more mailing lists