From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: fbdev: matroxfb: Use safer strscpy() instead of strcpy() Date: Tue, 28 Apr 2026 15:38:39 +1000 Message-ID: In-Reply-To: <20260425065926.1091168-2-aichao@kylinos.cn> References: <20260425065926.1091168-1-aichao@kylinos.cn> <20260425065926.1091168-2-aichao@kylinos.cn> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Files:** `matroxfb_base.c`, `matroxfb_crtc2.c` =E2=80=94 4 replacements No issues. All string literals fit their destinations: - `"MATROX"` (7 bytes) =E2=86=92 `fix->id` (`char[16]`)=20 - `"matroxfb"` (9 bytes) =E2=86=92 `r.driver` (`__u8[16]`) - `"Matrox"` (7 bytes) =E2=86=92 `r.card` (`__u8[32]`) - `"MATROX DH"` (10 bytes) =E2=86=92 `fix->id` (`char[16]`) Note the `r.driver` and `r.card` fields are `__u8[]` not `char[]` (from `st= ruct v4l2_capability`). `strscpy()` takes `char *` arguments, so this relie= s on an implicit cast. This works in practice but is worth noting =E2=80=94= the existing `strcpy()` had the same implicit cast. Also note the original line: ```c strcpy(fix->id,"MATROX"); ``` is changed to: ```c strscpy(fix->id, "MATROX"); ``` which adds a space after the comma =E2=80=94 a minor style improvement bund= led in. **Reviewed-by: acceptable** --- --- Generated by Claude Code Patch Reviewer