diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-04 23:37:50 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-04 23:37:50 +0000 |
commit | 495839a63f9516e20abbf0ab2258aa5d7dfa7180 (patch) | |
tree | db3dfe3e6daa194bb7b5e9ae5740a8c003babe3a /chrome/third_party | |
parent | 2b53fc56ad62c94b530ee8d1d866f71ffbe5d3b1 (diff) | |
download | chromium_src-495839a63f9516e20abbf0ab2258aa5d7dfa7180.zip chromium_src-495839a63f9516e20abbf0ab2258aa5d7dfa7180.tar.gz chromium_src-495839a63f9516e20abbf0ab2258aa5d7dfa7180.tar.bz2 |
nsNSSCertHelper: Restore the loop to use multiple bytes of bitfield.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/669096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/third_party')
-rw-r--r-- | chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp b/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp index 5006405..db64183 100644 --- a/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp +++ b/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp @@ -699,10 +699,8 @@ static std::string ProcessBitField(SECItem* bitfield, char separator) { unsigned int bits = 0; std::string rv; - // NSS bit flags like KU_DIGITAL_SIGNATURE, etc. are defined with the - // assumption that the bitfields have at most 8 bits. - if (bitfield->len) - bits = bitfield->data[0]; + for (size_t i = 0; i * 8 < bitfield->len && i < sizeof(bits); ++i) + bits |= bitfield->data[i] << (i * 8); for (size_t i = 0; i < len; ++i) { if (bits & string_map[i].mask) { if (!rv.empty()) |