diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-30 15:43:01 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-30 16:13:43 +0200 |
commit | 324636473aa65165caeee29e9b70e2d8c21fcb96 (patch) | |
tree | 505d93035a7c82f317b9315feff47029f35663da /thirdparty/icu4c | |
parent | e95e33f25137486d2df0a1c13e17394454c7fdf1 (diff) |
[Net] Fix Marshalls infinite recursion crash.
Variants like dictionaries and arrays can have cyclic references, which
caused `encode_variant` to run an infinite recursion.
Instead of keeping a stack and looking for cyclic references which would
make serialization slower, this commit adds a `MAX_RECURSION_DEPTH`
constant to Variant, and have `encode_variant` keep track of the current
recursion depth, bailing when it's too high since this likely means a
cyclic reference has been encountered.
Diffstat (limited to 'thirdparty/icu4c')
0 files changed, 0 insertions, 0 deletions