RESTRICT AUTOMERGE: Fix integer underflow vulnerability in PduParser

Problem:
A negative value-length in PduParser.parseContentType bypasses the bounds check, leading to an integer underflow and a massive array allocation (new byte[2GiB]) which causes an OutOfMemoryError in com.android.phone.

Fix details:
Added a bounds check `if (length < 0 || length > startPos)` in `PduParser.parseContentType` to reject negative lengths.

Bug: 517378147
Flag: EXEMPT BUGFIX
Test: atest TelephonyCommonTests:com.google.android.mms.pdu.test.PduParserTest
TAG=agy
CONV=0ecc5045-71ce-4e1d-a344-332cbbd9a407
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:f9abde7684ce9a94b377f5b1a046af3b099f80e4
Merged-In: I531242bfd3036da856c3e5b9737d48f17bb3b15e
Change-Id: I531242bfd3036da856c3e5b9737d48f17bb3b15e
2 files changed