diff options
author | Wink Saville <wink@google.com> | 2012-08-04 08:09:34 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-08-04 08:09:34 -0700 |
commit | 073517d3e1529f2a6007de5c6fbed5412dcfe59e (patch) | |
tree | b180f03e9462b90a586cd23a1e01f784ea879666 /src/java/com | |
parent | 8342d1630c433559835563eded2dacdbf35d9db4 (diff) | |
parent | d016bfd42fcfc230d0104fd16fa807bfd7ceb7e6 (diff) | |
download | frameworks_opt_telephony-073517d3e1529f2a6007de5c6fbed5412dcfe59e.zip frameworks_opt_telephony-073517d3e1529f2a6007de5c6fbed5412dcfe59e.tar.gz frameworks_opt_telephony-073517d3e1529f2a6007de5c6fbed5412dcfe59e.tar.bz2 |
am d016bfd4: Merge "fixes buffer overflow for data"
* commit 'd016bfd42fcfc230d0104fd16fa807bfd7ceb7e6':
fixes buffer overflow for data
Diffstat (limited to 'src/java/com')
-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++) { |