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: fix various cases of reading past `BIOS_MAX_SCAN_LEN` Date: Thu, 23 Apr 2026 08:42:23 +1000 Message-ID: In-Reply-To: <20260421-fix-vbios-v3-1-8f648aef7a85@nvidia.com> References: <20260421-fix-vbios-v3-0-8f648aef7a85@nvidia.com> <20260421-fix-vbios-v3-1-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 Good bug fix. Three distinct issues addressed: 1. `read_more_at_offset` now computes `end = offset + len` with checked add and validates `end > BIOS_MAX_SCAN_LEN` instead of only checking `offset`. The simplification to `self.read_more(end.saturating_sub(self.data.len()))` is correct and elegant -- it reads only the bytes actually needed. 2. `read_bios_image_at_offset` similarly uses checked add to avoid overflow on `offset + len`. 3. The iterator's `current_offset > BIOS_MAX_SCAN_LEN` changed to `>=`. This is correct -- if `current_offset == BIOS_MAX_SCAN_LEN`, there's nothing left to read. No issues. --- Generated by Claude Code Patch Reviewer