Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ac1cb78 authored by Soojung Shin's avatar Soojung Shin Committed by Simon Wilson
Browse files

mms: mms wap push length check before pdu processing.



Change-Id: Id5b5572bcd2953e496f03142d13bd2d012225e30
Signed-off-by: default avatarSoojung Shin <sj46.shin@samsung.com>
parent ff5a0990
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1015,7 +1015,6 @@ public final class BearerData {
            boolean decodingtypeUTF8 = Resources.getSystem()
                    .getBoolean(com.android.internal.R.bool.config_sms_utf8_support);

            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.
@@ -1026,6 +1025,7 @@ public final class BearerData {
            System.arraycopy(userData.payload, 0, payload, 0, copyLen);
            userData.payload = payload;

            if (!decodingtypeUTF8) {
                // 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);