diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-02 20:47:47 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-02 20:47:47 +0000 |
commit | bfde7449259ccf84393fd6751fca30ea36eb0368 (patch) | |
tree | 3135f358d5eedda8038ad3e3d6e24107d171609e /crypto | |
parent | ac9952bd1cc3880f70a67d3582c9dd51506f4297 (diff) | |
download | chromium_src-bfde7449259ccf84393fd6751fca30ea36eb0368.zip chromium_src-bfde7449259ccf84393fd6751fca30ea36eb0368.tar.gz chromium_src-bfde7449259ccf84393fd6751fca30ea36eb0368.tar.bz2 |
win: Fix a few minor issues found by clang.
No intended functionality change.
BUG=82385
TEST=compiles
Review URL: http://codereview.chromium.org/10332002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/rsa_private_key_win.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/crypto/rsa_private_key_win.cc b/crypto/rsa_private_key_win.cc index d87c1ec0..546a303 100644 --- a/crypto/rsa_private_key_win.cc +++ b/crypto/rsa_private_key_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -12,15 +12,6 @@ #pragma comment(lib, "crypt32.lib") -namespace { - // Helper for error handling during key import. -#define READ_ASSERT(truth) \ - if (!(truth)) { \ - NOTREACHED(); \ - return false; \ - } -} // namespace - namespace crypto { // static @@ -102,7 +93,10 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo( pki.private_exponent()->size()); dest += pki.private_exponent()->size(); - READ_ASSERT(dest == blob.get() + blob_size); + if (dest != blob.get() + blob_size) { + NOTREACHED(); + return NULL; + } if (!CryptImportKey(result->provider_, reinterpret_cast<uint8*>(public_key_struc), blob_size, 0, CRYPT_EXPORTABLE, result->key_.receive())) |