From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: vbios: use checked access in `FwSecBiosImage::header` Date: Thu, 23 Apr 2026 08:42:24 +1000 Message-ID: In-Reply-To: <20260421-fix-vbios-v3-4-8f648aef7a85@nvidia.com> References: <20260421-fix-vbios-v3-0-8f648aef7a85@nvidia.com> <20260421-fix-vbios-v3-4-8f648aef7a85@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Clean simplification. The old code read 4 bytes via direct slicing, extracted a `u32`, then masked out the version byte. The new code: ```rust let ver = data.get(1).copied().ok_or(EINVAL)?; ``` This is simpler and equivalent -- the version byte is at offset 1 in the header (the old code did `(hdr & 0xff00) >> 8` which extracts byte index 1 of the little-endian u32). The `.get()` is bounds-safe. No issues. --- Generated by Claude Code Patch Reviewer