8000 Check height limit in modular trees. by veluca93 · Pull Request #3943 · libjxl/libjxl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Conversation

veluca93
Copy link
Member

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).

@veluca93 veluca93 requested a review from eustas November 21, 2024 14:37
eustas
eustas previously approved these changes Nov 21, 2024
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).
@veluca93 veluca93 added this pull request to the merge queue Nov 21, 2024
Merged via the queue into libjxl:main with commit bf4781a Nov 21, 2024
101 checks passed
property_ranges[i].first = std::numeric_limits<pixel_type>::min();
property_ranges[i].second = std::numeric_limits<pixel_type>::max();
}
const int kHeightLimit = 2048;
Copy link
Member

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.

@mo271 mo271 added merge-0.7 PR label to flag PRs that need to be merged to v0.7.x merge-0.8 merge-0.9 PRs that need to be cherry picked into v0.9.x merge-0.10 labels Nov 26, 2024
mo271 pushed a commit to mo271/libjxl that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit to mo271/libjxl that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit to mo271/libjxl that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit to mo271/libjxl that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit to mo271/libjxl that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit that referenced this pull request Nov 26, 2024
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)
mo271 pushed a commit to mo271/libjxl that referenced this pull request Nov 27, 2024
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)
mo271 pushed a commit to mo271/libjxl that referenced this pull request Nov 27, 2024
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)
mo271 pushed a commit that referenced this pull request Nov 27, 2024
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-0.7 PR label to flag PRs that need to be merged to v0.7.x merge-0.8 merge-0.9 PRs that need to be cherry picked into v0.9.x merge-0.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0