Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: net/base/x509_certificate.cc

Issue 7792077: Fix a benign off-by-one error of kNumSerials in IsBlacklisted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/data/ssl/certificates/diginotar_public_ca_2025.pem » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate.cc
===================================================================
--- net/base/x509_certificate.cc (revision 99223)
+++ net/base/x509_certificate.cc (working copy)
@@ -641,7 +641,7 @@
}
bool X509Certificate::IsBlacklisted() const {
- static const unsigned kNumSerials = 257;
+ static const unsigned kNumSerials = 256;
static const unsigned kSerialBytes = 16;
static const uint8 kSerials[kNumSerials][kSerialBytes] = {
// Not a real certificate. For testing only.
@@ -947,8 +947,9 @@
if (serial_number_.size() == sizeof(kDigiNotarLeadingZero) &&
memcmp(serial_number_.data(), kDigiNotarLeadingZero,
sizeof(kDigiNotarLeadingZero)) == 0) {
- UMA_HISTOGRAM_ENUMERATION("Net.SSLCertBlacklisted", kNumSerials, kNumSerials + 1);
- return true;
+ UMA_HISTOGRAM_ENUMERATION("Net.SSLCertBlacklisted", kNumSerials,
+ kNumSerials + 1);
+ return true;
}
return false;
« no previous file with comments | « no previous file | net/data/ssl/certificates/diginotar_public_ca_2025.pem » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698