Bug 1508936 - Fix conversion to wide characters in OSReauthenticator r=keeler,mhowell
authorFranziskus Kiefer <franziskuskiefer@gmail.com>
Tue, 15 Jan 2019 01:21:00 +0000
changeset 513867 1f5f38b7f143b0db9eff95d72e8605c31905c48e
parent 513866 972a66d8aab1cc6d01bb8acbe2741c47faee3d1a
child 513868 ecba81cf5e7485ae6acd4974a3cbe7ee15dd093c
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskeeler, mhowell
bugs1508936
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508936 - Fix conversion to wide characters in OSReauthenticator r=keeler,mhowell Fix conversion to wide characters in OSReauthenticator Differential Revision: https://phabricator.services.mozilla.com/D12727
security/manager/ssl/OSReauthenticator.cpp
--- a/security/manager/ssl/OSReauthenticator.cpp
+++ b/security/manager/ssl/OSReauthenticator.cpp
@@ -79,17 +79,18 @@ static nsresult ReauthenticateUserWindow
   uint8_t numAttempts = 3;
   std::unique_ptr<char[]> userTokenInfo = GetUserTokenInfo();
 
   // CredUI prompt.
   CREDUI_INFOW credui = {};
   credui.cbSize = sizeof(credui);
   // TODO: maybe set parent (Firefox) here.
   credui.hwndParent = nullptr;
-  const nsString& prompt = PromiseFlatString(NS_ConvertUTF8toUTF16(aPrompt));
+  const nsString& tmpPrompt = NS_ConvertUTF8toUTF16(aPrompt);
+  const nsString& prompt = PromiseFlatString(tmpPrompt);
   credui.pszMessageText = prompt.get();
   credui.pszCaptionText = nullptr;
   credui.hbmBanner = nullptr;  // ignored
 
   while (!reauthenticated && numAttempts > 0) {
     --numAttempts;
 
     HANDLE lsa;