summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 21:57:48 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 21:57:48 +0000
commit9eacc664a1927d37e7b4484f2d54da2f348c6a3b (patch)
treefcf5a94aafad970a55b272d85d9a2857cdb91138 /chrome/installer
parent480262316ad42453e7609c012298bec3b6115ae0 (diff)
downloadchromium_src-9eacc664a1927d37e7b4484f2d54da2f348c6a3b.zip
chromium_src-9eacc664a1927d37e7b4484f2d54da2f348c6a3b.tar.gz
chromium_src-9eacc664a1927d37e7b4484f2d54da2f348c6a3b.tar.bz2
Convert SID string to ASCII before taking md5
(otherwise only half (the common half...:( ) of the sid string would get encoded...) this change is super trivial and only fixes the resulting suffix R=grt@chromium.org BUG=133810 TEST=Make sure Chrome gets the proper suffix Review URL: https://chromiumcodereview.appspot.com/10703147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146217 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/util/shell_util.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index ae69767..ad8ace3 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -14,6 +14,7 @@
#include <limits>
#include <list>
+#include <string>
#include "base/command_line.h"
#include "base/file_path.h"
@@ -140,7 +141,8 @@ UserSpecificRegistrySuffix::UserSpecificRegistrySuffix() {
}
COMPILE_ASSERT(sizeof(base::MD5Digest) == 16, size_of_MD5_not_as_expected_);
base::MD5Digest md5_digest;
- base::MD5Sum(user_sid.c_str(), user_sid.length(), &md5_digest);
+ std::string user_sid_ascii(UTF16ToASCII(user_sid));
+ base::MD5Sum(user_sid_ascii.c_str(), user_sid_ascii.length(), &md5_digest);
const string16 base32_md5(
ShellUtil::ByteArrayToBase32(md5_digest.a, arraysize(md5_digest.a)));
// The value returned by the base32 algorithm above must never change and