diff options
Diffstat (limited to 'net/quic/crypto/common_cert_set.cc')
-rw-r--r-- | net/quic/crypto/common_cert_set.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/quic/crypto/common_cert_set.cc b/net/quic/crypto/common_cert_set.cc index ee1ac67..01a54ce 100644 --- a/net/quic/crypto/common_cert_set.cc +++ b/net/quic/crypto/common_cert_set.cc @@ -53,17 +53,17 @@ StringPiece CommonCertSetsQUIC::GetCommonHashes() const { } StringPiece CommonCertSetsQUIC::GetCert(uint64 hash, uint32 index) const { - StringPiece cert; for (size_t i = 0; i < arraysize(kSets); i++) { if (kSets[i].hash == hash) { if (index < kSets[i].num_certs) { - cert.set(kSets[i].certs[index], kSets[i].lens[index]); + return StringPiece(reinterpret_cast<const char*>(kSets[i].certs[index]), + kSets[i].lens[index]); } break; } } - return cert; + return StringPiece(); } // Compare returns a value less than, equal to or greater than zero if |a| is |