Skip to content

Commit

Permalink
Check content disposition flag in carrier config before parsing PDU.
Browse files Browse the repository at this point in the history
Fixes #9081
  • Loading branch information
alex-signal committed Jan 27, 2020
1 parent ce86ada commit 0aad82d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ public synchronized void onResult(Context context, Intent intent) {

Log.i(TAG, baos.size() + "-byte response: ");// + Hex.dump(baos.toByteArray()));

RetrieveConf retrieved = (RetrieveConf) new PduParser(baos.toByteArray()).parse();
Bundle configValues = smsManager.getCarrierConfigValues();
boolean parseContentDisposition = configValues.getBoolean(SmsManager.MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION);

RetrieveConf retrieved = (RetrieveConf) new PduParser(baos.toByteArray(), parseContentDisposition).parse();

if (retrieved == null) return null;

Expand Down

0 comments on commit 0aad82d

Please sign in to comment.