ASoC: msm: Add check for both offset and index variable

-The offset and index variable may leads to array out of
boundary exception.
-Added offset and index overflow check.

Change-Id: I1f71ee595944573e85d77d2001f656bd8ba53806
CRs-fixed: 583931
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>