Skip to content
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

fix: Prevent out-of-bounds access in ceilSearch function #467

Merged
merged 1 commit into from
May 16, 2024

Conversation

obergaba
Copy link
Contributor

I've noticed that when subscribing to an instrument and specifying the depth of the order book that you would like to be updated on, the calculateMarketDepthAllowedByExchange function gets called with a vector of the actually possible depths the exchange offers. This function then utilizes the ceilSearch function to determine the closest greatest market depth allowed by the exchange to the depthWanted.

In the current implementation, there is a potential issue where the function may iterate beyond the last element of the vector if the desired market depth exceeds the greatest market depth offered by the exchange.

Will leave screenshots as an attachment.

**
Screenshot from 2024-05-15 20-41-02
Screenshot from 2024-05-15 20-43-45**

@chassis-community chassis-community merged commit a43bae1 into crypto-chassis:develop May 16, 2024
1 check passed
Copy link

🎉 This PR is included in version 6.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants