| Index: components/autofill/core/browser/personal_data_manager.cc
|
| diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
|
| index af62c8548cc24498ae51862960c1190a67bfe488..c1de29ec01614b069540c95eedb520958e501a07 100644
|
| --- a/components/autofill/core/browser/personal_data_manager.cc
|
| +++ b/components/autofill/core/browser/personal_data_manager.cc
|
| @@ -880,7 +880,9 @@ std::vector<Suggestion> PersonalDataManager::GetProfileSuggestions(
|
| // trial group or SIZE_MAX if no limit is defined.
|
| std::string limit_str = variations::GetVariationParamValue(
|
| kFrecencyFieldTrialName, kFrecencyFieldTrialLimitParam);
|
| - size_t limit;
|
| + size_t limit = SIZE_MAX;
|
| + // Reassign SIZE_MAX to |limit| is needed after calling base::StringToSizeT,
|
| + // as this method can modify |limit| even if it returns false.
|
| if (!base::StringToSizeT(limit_str, &limit))
|
| limit = SIZE_MAX;
|
|
|
|
|