Merge "Fix overflow check and check read result" into security-aosp-mnc-mr1-release