Skip to content

Conversation

@yisibl
Copy link
Member

@yisibl yisibl commented Jan 8, 2026

  • Validate padding: reject NaN, Infinity, and negative values (use 0.0 for invalid)
  • Validate bbox: dimensions must be positive (non-positive silently ignored)
  • Change threshold from == 0.0 to < 1.0 to prevent OOM risk
  • Replace all .unwrap() calls with if let Some() for safe error handling
  • Add edge case tests for invalid inputs

@vercel
Copy link

vercel bot commented Jan 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
resvg-js Ready Ready Preview, Comment Jan 9, 2026 6:13am

- Validate `padding`: reject NaN, Infinity, and negative values (use 0.0 for invalid)
- Validate bbox: dimensions must be positive (non-positive silently ignored)
- Change threshold from == 0.0 to < 1.0 to prevent OOM risk
- Replace all .unwrap() calls with if let Some() for safe error handling
- Add edge case tests for invalid inputs
@yisibl yisibl marked this pull request as ready for review January 9, 2026 06:10
@yisibl yisibl merged commit e3ac45d into main Jan 9, 2026
44 checks passed
@yisibl yisibl deleted the fix-cropByBBox-limit branch January 9, 2026 06:27
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