Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] video/hdmi: inaccurate Fixes trailer for
  hdmi_spd_infoframe_init()
--

commit 7959e6f9456b8b3e3ae9874fc5b26920be113583
Author: Cristian Ciocaltea <[email protected]>

> video/hdmi: Copy SPD vendor/product with strtomem_pad()
>
> The HDMI specification defines the SPD InfoFrame Vendor Name and Product
> Description as fixed-size fields, padded with zeros and left without any
> trailing NUL when a name spans the whole field.
>
> Mark the fields as non-strings, so that the copies can be handed over to
> strtomem_pad(), which implements precisely the required semantics.  This
> also bounds the reads from the source strings, whereas the open-coded
> strlen() could run past the end of the buffer in the
> hdmi_spd_infoframe_unpack() path, where the names come straight from the
> wire and are not NUL-terminated.
>
> Fixes: 2c676f378edb ("[media] hdmi: added unpack and logging functions for 
> InfoFrames")
> Cc: [email protected] # v6.1+
> Signed-off-by: Cristian Ciocaltea <[email protected]>

[Severity: Low]
Should the Fixes: tag point to 35bed3fa9ec5 ("drivers/video: Fix
-Wstringop-truncation in hdmi.c") instead?

When 2c676f378edb ("[media] hdmi: added unpack and logging functions for
InfoFrames") added hdmi_spd_infoframe_unpack(), hdmi_spd_infoframe_init()
used strncpy() bounded by sizeof(frame->vendor) and
sizeof(frame->product).  The unbounded strlen() calls replaced by this
patch were introduced by 35bed3fa9ec5 ("drivers/video: Fix
-Wstringop-truncation in hdmi.c").

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to