mirror of
https://github.com/yuzu-emu/breakpad
synced 2024-11-22 11:03:38 +00:00
Limit Tokenize max_tokens to 512 when parsing INLINE record.
This is a more practical reserved capacity than std::numeric_limits<int>::max() for the vector. Change-Id: Ic8d4e812c3804e4f15cc51650f7a91bae7313415 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3301419 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
This commit is contained in:
parent
998a0a480c
commit
4ee9854be5
1 changed files with 2 additions and 1 deletions
|
@ -730,7 +730,8 @@ bool SymbolParseHelper::ParseInline(
|
|||
inline_line += 7; // skip prefix
|
||||
|
||||
vector<char*> tokens;
|
||||
Tokenize(inline_line, kWhitespace, std::numeric_limits<int>::max(), &tokens);
|
||||
// Increase max_tokens if necessary.
|
||||
Tokenize(inline_line, kWhitespace, 512, &tokens);
|
||||
|
||||
// Determine the version of INLINE record by parity of the vector length.
|
||||
*has_call_site_file_id = tokens.size() % 2 == 0;
|
||||
|
|
Loading…
Reference in a new issue