-
Notifications
You must be signed in to change notification settings - Fork 293
Check height limit in modular trees. #3943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB).
property_ranges[i].first = std::numeric_limits<pixel_type>::min(); | ||
property_ranges[i].second = std::numeric_limits<pixel_type>::max(); | ||
} | ||
const int kHeightLimit = 2048; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the Level 10 limit. In Level 5, the tree height limit is much smaller: 64. It's probably not really needed to verify the exact limits, but I'm not sure if e.g. the current encoder actually respects Level 5 limits while still producing Level 5 output, and if we don't check in the decoder then this will not be noticed.
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low. Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB). (cherry picked from commit bf4781a)
Also rewrite the implementation to use iterative checking instead of recursive checking of tree property values, to ensure stack usage is low.
Before, it was possible for appropriately-crafted files to use a significant amount of stack (in the order of hundreds of MB).