diff options
author | Wink Saville <wink@google.com> | 2012-08-04 07:50:10 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-08-04 07:50:11 -0700 |
commit | d016bfd42fcfc230d0104fd16fa807bfd7ceb7e6 (patch) | |
tree | 55d0e766b3e3a838134560b0e7d6ee7a8c37acbd /src | |
parent | f8f82e088e109049cb888a75af0686afd118ea85 (diff) | |
parent | c1e1c4722539812750c2d22dd9cf5f8df0ed7da0 (diff) | |
download | frameworks_opt_telephony-d016bfd42fcfc230d0104fd16fa807bfd7ceb7e6.zip frameworks_opt_telephony-d016bfd42fcfc230d0104fd16fa807bfd7ceb7e6.tar.gz frameworks_opt_telephony-d016bfd42fcfc230d0104fd16fa807bfd7ceb7e6.tar.bz2 |
Merge "fixes buffer overflow for data"
Diffstat (limited to 'src')
-rwxr-xr-x | src/java/com/android/internal/telephony/cdma/CdmaLteUiccRecords.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/java/com/android/internal/telephony/cdma/CdmaLteUiccRecords.java b/src/java/com/android/internal/telephony/cdma/CdmaLteUiccRecords.java index eaa2ede..97f973f 100755 --- a/src/java/com/android/internal/telephony/cdma/CdmaLteUiccRecords.java +++ b/src/java/com/android/internal/telephony/cdma/CdmaLteUiccRecords.java @@ -116,7 +116,8 @@ public final class CdmaLteUiccRecords extends SIMRecords { int encoding = data[1]; int language = data[2]; byte[] spnData = new byte[32]; - System.arraycopy(data, 3, spnData, 0, (data.length < 32) ? data.length : 32); + int len = ((data.length - 3) < 32) ? (data.length - 3) : 32; + System.arraycopy(data, 3, spnData, 0, len); int numBytes; for (numBytes = 0; numBytes < spnData.length; numBytes++) { |