diff options
| author | Tharit Tangkijwanichakul <tharitt97@gmail.com> | 2026-07-31 14:07:51 +0000 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-10-04 17:32:43 +0200 |
| commit | 2b685dba4226792933f45b1cbf8991e89ccd21ce (patch) | |
| tree | f4e6ef3928fd853ce3cc39a287196c4abe104083 /rust/kernel/alloc | |
| parent | c657eb609197e289b054bc2c4e86a0fc32dd7ebe (diff) | |
media: hantro: Harden MPEG-2 control access against NULL
The MPEG-2 sequence and picture controls are validated
before a job is queued, so hantro_get_ctrl() is not expected to return
NULL in hantro_g1_mpeg2_dec_run(). The controls are nonetheless
dereferenced unconditionally.
Harden the invariant by checking the sequence and picture controls with
WARN_ON().
Found by code inspection.
Fixes: f329e21e9dad ("media: uapi: mpeg2: Split sequence and picture parameters")
Cc: stable@vger.kernel.org
Signed-off-by: Tharit Tangkijwanichakul <tharitt97@gmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions
