LoadCachedBook reads each index entry's parent back-reference straight from the .cached file and uses it as m_index[m_index.size() - parentShift] with no check, so a crafted cached file (which can sit inside a .htb help archive opened through AddBook) makes the subtraction wrap and leaves the parent pointer outside the array; that pointer is later dereferenced when the index is sorted at the end of AddBookParam. The change rejects the file when parentShift is negative or larger than the number of index entries loaded so far, matching the existing version and flags checks just above. There's a small test under tests/html that feeds such a cached stream and confirms it is now refused rather than reading out of bounds.
https://github.com/wxWidgets/wxWidgets/pull/26577
(5 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Nice find, thanks, will merge soon.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()