forked from rubenslte/android_kernel_samsung_msm8226
During sound model registration, the total memory size needed by the sound model data is the sum of sound model length, number of zero padding bytes and the calibration size. It is possible this sum can result into integer overflow causing difficult to debug issues. Add check for integer overflow to avoid such possible issues. CRs-fixed: 792367 Change-Id: I9f451aa308214a4eac42b82e2abf1375c858ff30 Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org> CVE-2015-8940 Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>