🐛 bug: Fix ARMv7 build overflow in etag middleware#4190
Conversation
Cast math.MaxUint32 to uint64 to prevent integer overflow on 32-bit ARM platforms Agent-Logs-Url: https://github.com/gofiber/fiber/sessions/44b365ec-92b2-4ef3-b17a-20aad6c316d0 Co-authored-by: gaby <835733+gaby@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4190 +/- ##
==========================================
+ Coverage 91.18% 91.23% +0.05%
==========================================
Files 123 123
Lines 11847 11847
==========================================
+ Hits 10803 10809 +6
+ Misses 658 653 -5
+ Partials 386 385 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@claude[agent] check the code base to see if this fix is needed anywhere else. |
I checked the entire codebase for similar issues. All other uses of |
There was a problem hiding this comment.
Pull request overview
This PR updates ETag middleware length checks to make the math.MaxUint32 comparison explicitly uint64-typed, aligning both sides of the comparison.
Changes:
- Cast
math.MaxUint32touint64inGenerateto keep the overflow guard type-consistent. - Cast
math.MaxUint32touint64in the middleware handler’s body-length guard before computing the ETag.
|
Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
No description provided.