Skip to content

Conversation

@a10y
Copy link
Contributor

@a10y a10y commented May 9, 2025

No description provided.

@a10y a10y force-pushed the aduffy/arbitrary-decimal branch from a050404 to 570130f Compare May 9, 2025 15:48
@a10y a10y enabled auto-merge (squash) May 9, 2025 15:48
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y force-pushed the aduffy/arbitrary-decimal branch from 570130f to fa39121 Compare May 9, 2025 15:50
Copy link
Contributor

@joseph-isaacs joseph-isaacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What not fuzz decimal 256

@joseph-isaacs joseph-isaacs disabled auto-merge May 9, 2025 16:00
// Get a random integer for the scale
let precision = u8::try_from(u.int_in_range(0..=38)?).expect("u8 overflow");
let scale = i8::try_from(u.int_in_range(-38..=38)?).expect("i8 overflow");
let precision = u8::try_from(u.int_in_range(1..=38)?).expect("u8 overflow");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let precision = u8::try_from(u.int_in_range(1..=38)?).expect("u8 overflow");
let precision = u8::try_from(u.int_in_range(1..=MAX_PRECISION)?).expect("u8 overflow");

@a10y
Copy link
Contributor Author

a10y commented May 9, 2025

Yea we can, need to also fix scalar generation logic too to distinguish

@a10y
Copy link
Contributor Author

a10y commented May 9, 2025

One sec

Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y force-pushed the aduffy/arbitrary-decimal branch from fc217eb to 6d77334 Compare May 9, 2025 18:03
@a10y a10y enabled auto-merge (squash) May 9, 2025 18:03
@a10y a10y merged commit a4cf669 into develop May 9, 2025
33 checks passed
@a10y a10y deleted the aduffy/arbitrary-decimal branch May 9, 2025 18:14
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.

4 participants