Chromium Code Reviews| Index: chrome/browser/chromeos/login/owner_key_utils.cc |
| diff --git a/chrome/browser/chromeos/login/owner_key_utils.cc b/chrome/browser/chromeos/login/owner_key_utils.cc |
| index c4654bfbd0108ccdbbb72d380c73c4fd1917c839..39058ecc32662610fc5aae486978231f2753ac53 100644 |
| --- a/chrome/browser/chromeos/login/owner_key_utils.cc |
| +++ b/chrome/browser/chromeos/login/owner_key_utils.cc |
| @@ -123,6 +123,12 @@ bool OwnerKeyUtilsImpl::ImportPublicKey(const FilePath& key_file, |
| int32 safe_file_size = static_cast<int32>(file_size); |
| output->resize(safe_file_size); |
| + |
| + if (safe_file_size == 0) { |
| + LOG(WARNING) << "Public key file is empty. This seems wrong."; |
|
Mattias Nissler (ping if slow)
2012/05/21 16:30:34
nit: Remove "This seems wrong.", it is redundant.
|
| + return false; |
| + } |
| + |
| // Get the key data off of disk |
| int data_read = file_util::ReadFile(key_file, |
| reinterpret_cast<char*>(&(output->at(0))), |