From: Hans Verkuil Date: Wed, 14 Feb 2018 12:03:16 +0000 (+0100) Subject: media: v4l2-compat-ioctl32.c: avoid sizeof(type) X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d4a1d4e7c67e3e6b083797e9ef220cf287b45a9;p=pandora-kernel.git media: v4l2-compat-ioctl32.c: avoid sizeof(type) commit 333b1e9f96ce05f7498b581509bb30cde03018bf upstream. Instead of doing sizeof(struct foo) use sizeof(*up). There even were cases where 4 * sizeof(__u32) was used instead of sizeof(kp->reserved), which is very dangerous when the size of the reserved array changes. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab [bwh: Rebased on top of some earlier fixes] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed