SoC: msm: Add Buffer overflow check 1

https://github.com/neobuddy89/hammerhead/commit/f10367c6c67b74d600e0e498846fc731365dc600