From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/panic: Look up glyph shape with font helper Date: Thu, 04 Jun 2026 16:27:41 +1000 Message-ID: In-Reply-To: <20260529140759.529929-4-tzimmermann@suse.de> References: <20260529140759.529929-1-tzimmermann@suse.de> <20260529140759.529929-4-tzimmermann@suse.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Converts `draw_txt_rectangle()` in `drm_panic.c`: ```c - src =3D drm_draw_get_char_bitmap(font, msg[i].txt[j], font_pitch); + src =3D font_data_glyph_buf(font->data, font->width, font->height, + (unsigned char)msg[i].txt[j]); rec.x2 =3D rec.x1 + font->width; - drm_panic_blit(sb, &rec, src, font_pitch, 1, color); + if (src) + drm_panic_blit(sb, &rec, src, font_pitch, 1, color); rec.x1 +=3D font->width; ``` Same pattern as patch 2. `rec.x2` is set before the NULL check, but this is= harmless =E2=80=94 it gets overwritten on the next loop iteration regardle= ss. The bounds checking is especially valuable in panic context where safety is= paramount and we must not compound a crash with a second fault from an out= -of-bounds font read. **No bugs. Looks good.** --- Generated by Claude Code Patch Reviewer