Merge "diag: Prevent crash due to buffer over run" into msm-3.0