| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Cast the divisor to POLYSIGNED so a negative offset is not promoted to unsigned before the division. Without the cast, offset / sizeof(PolyWord) converts the negative offset to a large unsigned value, and the resulting pointer addition overflows (UBSan: addition of unsigned offset overflowed). Fixes polyml#271.
| Back | FazBrowse Home | New Git URL |
Fixes #271.
Casts the divisor to POLYSIGNED so the negative offset isn't promoted to unsigned before the division. Without the cast, offset / sizeof(PolyWord) converts the negative offset to a large unsigned value and the resulting pointer addition overflows (UBSan: addition of unsigned offset overflowed).
Validated locally - both reproducers in #271 no longer trigger the UBSan violation.