Skip to content

fix(price-alert): validate finite and non-negative price floats before converting to u64 cents - #20

Open
yappermoar-boop wants to merge 1 commit into
SubzeroLabs:mainfrom
yappermoar-boop:fix-price-alert-float-cast-bounds-check
Open

fix(price-alert): validate finite and non-negative price floats before converting to u64 cents#20
yappermoar-boop wants to merge 1 commit into
SubzeroLabs:mainfrom
yappermoar-boop:fix-price-alert-float-cast-bounds-check

Conversation

@yappermoar-boop

Copy link
Copy Markdown

Added price_resp.price.is_finite() && price_resp.price >= 0.0 validation and .min(u64::MAX as f64) clamping in venus/price-alert/src/lib.rs before casting price float to u64 cents. Previously, receiving NaN, Infinity, or negative price floats from API responses produced undefined integer conversion behavior or invalid alert triggers.

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Subzero Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant