summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/adv7511.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-09-20 20:51:29 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-10-01 20:56:14 +0200
commit480b8b3e42c3d959f8b6346c24c088eb70ef9fc2 (patch)
tree6eaaad4b82359ab2463823bccd2cbe12eabe8deb /drivers/media/i2c/adv7511.c
parentvideo/hdmi: Constify 'buffer' to the unpack functions (diff)
downloadlinux-480b8b3e42c3d959f8b6346c24c088eb70ef9fc2.tar.xz
linux-480b8b3e42c3d959f8b6346c24c088eb70ef9fc2.zip
video/hdmi: Pass buffer size to infoframe unpack functions
To make sure the infoframe unpack functions don't end up examining stack garbage or oopsing, let's pass in the size of the buffer. v2: Convert tda1997x.c as well (kbuild test robot) Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: linux-media@vger.kernel.org Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-3-ville.syrjala@linux.intel.com Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'drivers/media/i2c/adv7511.c')
-rw-r--r--drivers/media/i2c/adv7511.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c
index 55c2ea0720d9..b85b181bbb6c 100644
--- a/drivers/media/i2c/adv7511.c
+++ b/drivers/media/i2c/adv7511.c
@@ -550,7 +550,7 @@ static void log_infoframe(struct v4l2_subdev *sd, const struct adv7511_cfg_read_
buffer[3] = 0;
buffer[3] = hdmi_infoframe_checksum(buffer, len + 4);
- if (hdmi_infoframe_unpack(&frame, buffer) < 0) {
+ if (hdmi_infoframe_unpack(&frame, buffer, sizeof(buffer)) < 0) {
v4l2_err(sd, "%s: unpack of %s infoframe failed\n", __func__, cri->desc);
return;
}