Skip to content

Conversation

@qkaiser
Copy link
Contributor

@qkaiser qkaiser commented Oct 17, 2025

Potential fix for https://github.com/onekey-sec/unblob/security/code-scanning/316

The best way to ensure complete ordering is to use the functools.total_ordering decorator on the YAFFSEntry class. This decorator automatically fills in the missing rich comparison methods if at least __eq__ and one of __lt__, __le__, __gt__, or __ge__ are defined. Since YAFFSEntry already defines __eq__, __lt__, and __gt__, it's safe to decorate it with @functools.total_ordering. This change should be made directly above the class definition, after importing functools in the file if it’s not already imported.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…eQL)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants