drm/nouveau: fix another off-by-one in nvbios_addr
authorTimur Tabi <ttabi@nvidia.com>
Wed, 11 May 2022 16:37:16 +0000 (11:37 -0500)
committerKarol Herbst <kherbst@redhat.com>
Thu, 4 Aug 2022 16:28:24 +0000 (18:28 +0200)
commit54d91b55c7f3f9f2c86e0b6be4501433b32ddc89
treef6179a1c9f57556b3c04ec85701f062b1c37f033
parent30bdc36b8c776cd4fce5de2a96ff28b37f96942f
drm/nouveau: fix another off-by-one in nvbios_addr

This check determines whether a given address is part of
image 0 or image 1.  Image 1 starts at offset image0_size,
so that address should be included.

Fixes: 4d4e9907ff572 ("drm/nouveau/bios: guard against out-of-bounds accesses to image")
Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220511163716.3520591-1-ttabi@nvidia.com
drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c