staging: bcm2835-camera: Fix buffer overflow calculation on query of camera properties
authorMichael Zoran <mzoran@crowfest.net>
Fri, 10 Mar 2017 05:08:57 +0000 (21:08 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2017 09:12:10 +0000 (10:12 +0100)
commit85b1ac7359366e7386fb593427ee3e981e065259
tree82f3437acd4f76cda5dff4b5ce8600bbeecd3e94
parent74369b5f22b72a4b4fd38a12f36251d38c022831
staging: bcm2835-camera: Fix buffer overflow calculation on query of camera properties

The code that queries properties on the camera has a check
for buffer overruns if the firmware sends too much data.  This
check is incorrect, and during testing I was seeing stack corruption.

I believe this error can actually happen in normal use, just for
some reason it doesn't appear on 32 bit as often.  So perhaps
it's best for the check to be fixed.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c