Limit nesting of RegistryDicts in preg_parser

Limit number of path components in preg_parser and thus nesting of the
resulting RegistryDict tree.
Also switch to SplitStringPiece to use less memory.

Bug: 798764
Test: clusterfuzz repro and components_unittests --gtest_filter=PRegParserTest*
Change-Id: I2a47832240f1a61dc7877d8086bba0b3347d3055
Reviewed-on: https://chromium-review.googlesource.com/870033
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Pavol Marko <pmarko@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#530096}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7fe21736cde8fc94a1f60c3ccb9c551c4f5e2992
1 file changed