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

Unified Diff: chrome/browser/safe_browsing/signature_util_win.cc

Issue 9283039: Merge 117080 - Fix null deref when walking cert chain. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: Created 8 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/signature_util_win.cc
===================================================================
--- chrome/browser/safe_browsing/signature_util_win.cc (revision 118902)
+++ chrome/browser/safe_browsing/signature_util_win.cc (working copy)
@@ -64,10 +64,14 @@
for (DWORD i = 0; i < prov_data->csSigners; ++i) {
const CERT_CHAIN_CONTEXT* cert_chain_context =
prov_data->pasSigners[i].pChainContext;
+ if (!cert_chain_context)
+ break;
for (DWORD j = 0; j < cert_chain_context->cChain; ++j) {
CERT_SIMPLE_CHAIN* simple_chain = cert_chain_context->rgpChain[j];
ClientDownloadRequest_CertificateChain* chain =
signature_info->add_certificate_chain();
+ if (!simple_chain)
+ break;
for (DWORD k = 0; k < simple_chain->cElement; ++k) {
CERT_CHAIN_ELEMENT* element = simple_chain->rgpElement[k];
chain->add_element()->set_certificate(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698