Fix for NPE on null mms bytes.

This commit is contained in:
Moxie Marlinspike 2013-02-26 22:56:15 -08:00
parent 6bd0f35787
commit eb9b2ef318

View File

@ -40,7 +40,7 @@ public class MmsSendHelper extends MmsCommunication {
AndroidHttpClient client = null; AndroidHttpClient client = null;
try { try {
Log.w("MmsSender", "Sending MMS1 of length: " + mms.length); Log.w("MmsSender", "Sending MMS1 of length: " + (mms != null ? mms.length : "null"));
client = constructHttpClient(context, parameters); client = constructHttpClient(context, parameters);
URI targetUrl = new URI(parameters.getMmsc()); URI targetUrl = new URI(parameters.getMmsc());
HttpHost target = new HttpHost(targetUrl.getHost(), targetUrl.getPort(), HttpHost.DEFAULT_SCHEME_NAME); HttpHost target = new HttpHost(targetUrl.getHost(), targetUrl.getPort(), HttpHost.DEFAULT_SCHEME_NAME);