Re: [PATCH v1 1/2] media: atomisp: fix potential NULL pointer dereference in configure_isp_from_args()
From: Dan Carpenter
Date: Mon Mar 30 2026 - 05:42:49 EST
On Sat, Mar 28, 2026 at 08:21:37PM +0100, Jose A. Perez de Azpillaga wrote:
> The function configure_isp_from_args() incorrectly dereferences
> args->delay_frames[0] to configure cropping without checking if the
> pointer is valid. However, as noted in a FIXME comment later in the
> same function, delay_frames can be NULL in certain pipeline
> configurations.
The comment comes later in the function and it says "FIXME:
args->delay_frames can be NULL here". "args->delay_frames" is
different from "args->delay_frames[0]". Obviously
args->delay_frames can't actually be NULL there since we
dereference it here so the comment is wrong.
If the correct response to the FIXME were just to add a NULL
check then the original author probably would have done that.
regards,
dan carpenter