adpcm: fix out of bound reads due to integer overflow