am 6b6869d5: Merge "mms: mms wap push length check before pdu processing." into gingerbread
* commit '6b6869d5c1a203e79dc272f2f0e53c184f44f24a': mms: mms wap push length check before pdu processing.
This commit is contained in:
@@ -1015,17 +1015,17 @@ public final class BearerData {
|
||||
boolean decodingtypeUTF8 = Resources.getSystem()
|
||||
.getBoolean(com.android.internal.R.bool.config_sms_utf8_support);
|
||||
|
||||
// Strip off any padding bytes, meaning any differences between the length of the
|
||||
// array and the target length specified by numFields. This is to avoid any
|
||||
// confusion by code elsewhere that only considers the payload array length.
|
||||
byte[] payload = new byte[userData.numFields];
|
||||
int copyLen = userData.numFields < userData.payload.length
|
||||
? userData.numFields : userData.payload.length;
|
||||
|
||||
System.arraycopy(userData.payload, 0, payload, 0, copyLen);
|
||||
userData.payload = payload;
|
||||
|
||||
if (!decodingtypeUTF8) {
|
||||
// Strip off any padding bytes, meaning any differences between the length of the
|
||||
// array and the target length specified by numFields. This is to avoid any
|
||||
// confusion by code elsewhere that only considers the payload array length.
|
||||
byte[] payload = new byte[userData.numFields];
|
||||
int copyLen = userData.numFields < userData.payload.length
|
||||
? userData.numFields : userData.payload.length;
|
||||
|
||||
System.arraycopy(userData.payload, 0, payload, 0, copyLen);
|
||||
userData.payload = payload;
|
||||
|
||||
// There are many devices in the market that send 8bit text sms (latin encoded) as
|
||||
// octet encoded.
|
||||
userData.payloadStr = decodeLatin(userData.payload, offset, userData.numFields);
|
||||
|
||||
Reference in New Issue
Block a user