From 958c7c7e65999c61af7da0812d2de12daa8fc29e Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 18 Jul 2014 05:15:21 -0300 Subject: [PATCH] [media] v4l2-ctrls: fix corner case in round-to-range code If you have a maximum that is at the limit of what the type supports, and the step is > 1, then you can get wrap-around errors since the code assumes that the maximum that the type supports is ctrl->maximum + ctrl->step / 2. In practice this is always fine, but in artificially crafted ranges you will hit this bug. Since this is core code it should just work. This bug has always been there but since it doesn't cause problems in practice it was never noticed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Reading git-format-patch failed