-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Storable: improve recursion depth check
Store each recursive SV and only ++depth when recursing into this same SV, not nested into 2 levels, for performance reasons. (We'd really need to store a hash, but this would be slow.) So it only protects from the simpliest stack exhaustion attacks, others still will segfault. Decrease the max depth numbers: 2000 for RV and AV, 1000 for HV, experimentally tested for normal stack sizes. At least it doesnt falsely error with an arrayref nested into another big array, as with the CPAN write_metadata_cache. Check now also refs recursion into each other. Closes #257.
- Loading branch information
Showing
3 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters