Backed out changeset 118d4c56c3c4 (bug 1031647)
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 15 Oct 2014 10:51:15 +0900
changeset 210486 9d7c9f78230b21a33bc40a03bdcaf05f5d9c6824
parent 210485 118d4c56c3c4deedb28a2497af27bbdfbe094902
child 210487 3de05e0f076dde874cce4e6ed39fa85268f486fd
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1031647
milestone36.0a1
backs out118d4c56c3c4deedb28a2497af27bbdfbe094902
Backed out changeset 118d4c56c3c4 (bug 1031647)
dom/system/gonk/NetworkUtils.cpp
--- a/dom/system/gonk/NetworkUtils.cpp
+++ b/dom/system/gonk/NetworkUtils.cpp
@@ -735,18 +735,18 @@ void NetworkUtils::postTetherInterfaceLi
                                            CommandCallback aCallback,
                                            NetworkResultOptions& aResult)
 {
   // Send the dummy command to continue the function chain.
   char command[MAX_COMMAND_SIZE];
   snprintf(command, MAX_COMMAND_SIZE - 1, "%s", DUMMY_COMMAND);
 
   char buf[BUF_SIZE];
-  NS_ConvertUTF16toUTF8 reason(aResult.mResultReason);
-  memcpy(buf, reason.get(), reason.Lenth() + 1);
+  const char* reason = NS_ConvertUTF16toUTF8(aResult.mResultReason).get();
+  memcpy(buf, reason, strlen(reason));
   split(buf, INTERFACE_DELIMIT, GET_FIELD(mInterfaceList));
 
   doCommand(command, aChain, aCallback);
 }
 
 void NetworkUtils::setIpForwardingEnabled(CommandChain* aChain,
                                           CommandCallback aCallback,
                                           NetworkResultOptions& aResult)