From 1f89f12bf3ea5305ae55d4b7c830d893ef5079a2 Mon Sep 17 00:00:00 2001 From: Chuck Lee Date: Wed, 11 Dec 2013 12:46:16 +0800 Subject: [PATCH] Bug 947814 - 0001. Assign length of data. r=vicamo --- dom/wappush/src/gonk/CpPduHelper.jsm | 2 +- dom/wappush/src/gonk/WapPushManager.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dom/wappush/src/gonk/CpPduHelper.jsm b/dom/wappush/src/gonk/CpPduHelper.jsm index 5f4bb38f209..728a31e32d2 100644 --- a/dom/wappush/src/gonk/CpPduHelper.jsm +++ b/dom/wappush/src/gonk/CpPduHelper.jsm @@ -185,9 +185,9 @@ this.Authenticator = { checked: false, sec: AUTH_SEC_TYPE[sec], mac: mac.toUpperCase(), - dataLength: wbxml.length, data: wbxml }; + authInfo.data.length = wbxml.length; switch (authInfo.sec) { case "NETWPIN": diff --git a/dom/wappush/src/gonk/WapPushManager.js b/dom/wappush/src/gonk/WapPushManager.js index 4821767af30..f52ba7a503f 100644 --- a/dom/wappush/src/gonk/WapPushManager.js +++ b/dom/wappush/src/gonk/WapPushManager.js @@ -123,6 +123,7 @@ this.WapPushManager = { contentType: contentType, content: data.array }; + msg.content.length = data.array.length; } let sender = PhoneNumberUtils.normalize(options.sourceAddress, false);