msm-camera: Addressing possible overflow conditions

Changes to address possible integer overflow and incorrect
array indexing conditions.

CAF-Change-Id: Ib134320cd6f7b34d7a10572ec347ec12127049a9
Signed-off-by: Trilokesh Rangam <tranga@codeaurora.org>
CVE-2016-10233
[haggertk]: Backport to 3.4/msm8974

Change-Id: I7342eb5e813745ac1f0611bab7b8eb63eaf570c4
1 file changed