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..ef450b5583822a1c3f52a24e00e2b0e8afe65c0e 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."; |
| + return true; |
|
Mattias Nissler (ping if slow)
2012/05/21 14:33:27
It seems returning true here is actually the wrong
pastarmovj
2012/05/21 14:38:23
This was intentional as can be seen from the unit
Mattias Nissler (ping if slow)
2012/05/21 15:14:28
Have you checked the caller? A quick look in Owner
pastarmovj
2012/05/21 16:26:02
Changed as discussed.
|
| + } |
| + |
| // Get the key data off of disk |
| int data_read = file_util::ReadFile(key_file, |
| reinterpret_cast<char*>(&(output->at(0))), |