Bug 1636318 - fix incorrect uses of nsTextFormatter::ssprintf(). r=mkmelin
authorJorg K <jorgk@jorgk.com>
Mon, 11 May 2020 12:01:00 +0300
changeset 39124 03bb86addb5dfce9e5756c712075f9aaa531a9c6
parent 39123 d58c5ca03202c9d27ae5ccdfdb867ee442ff411d
child 39125 73be5343da88f1cc236266ab86017fc8a953170b
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersmkmelin
bugs1636318
Bug 1636318 - fix incorrect uses of nsTextFormatter::ssprintf(). r=mkmelin
mailnews/compose/src/nsMsgSend.cpp
mailnews/local/src/nsPop3Protocol.cpp
--- a/mailnews/compose/src/nsMsgSend.cpp
+++ b/mailnews/compose/src/nsMsgSend.cpp
@@ -4003,17 +4003,17 @@ nsresult nsMsgComposeAndSend::MimeDoFCC(
       status = rv;
       goto FAIL;
     }
     folder->GetName(mSavedToFolderName);
     if (!mSavedToFolderName.IsEmpty())
       nsTextFormatter::ssprintf(printfString, msg.get(),
                                 mSavedToFolderName.get());
     else
-      nsTextFormatter::ssprintf(printfString, msg.get(), "?");
+      nsTextFormatter::ssprintf(printfString, msg.get(), u"?");
     SetStatusMessage(printfString);
   }
 
   if (folderIsLocal) {
     char *envelopeLine = nsMsgGetEnvelopeLine();
     uint32_t len = PL_strlen(envelopeLine);
 
     rv = tempOutfile->Write(envelopeLine, len, &n);
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -3293,17 +3293,17 @@ int32_t nsPop3Protocol::TopResponse(nsII
     mLocalBundle->GetStringFromName("pop3ServerDoesNotSupportTopCommand",
                                     statusTemplate);
     if (!statusTemplate.IsEmpty()) {
       nsAutoCString hostName;
       nsString statusString;
       m_url->GetHost(hostName);
 
       nsTextFormatter::ssprintf(statusString, statusTemplate.get(),
-                                hostName.get());
+                                NS_ConvertUTF8toUTF16(hostName).get());
       UpdateStatusWithString(statusString.get());
     }
 
     if (m_prefAuthMethods != POP3_HAS_AUTH_USER &&
         TestCapFlag(POP3_HAS_XSENDER))
       m_pop3ConData->next_state = POP3_SEND_XSENDER;
     else
       m_pop3ConData->next_state = POP3_SEND_RETR;