Fix for array out of bound access in impd_drc_get_gain

Add necessary checks to avoid any possible array
out of bounds operation in the impd_drc_get_gain
function.

Bug: 161820233
Test: poc in bug

Change-Id: Ie55fbbc18c76f224983d1032641de4df4dce3fb3
1 file changed