Opened 8 years ago
Closed 8 years ago
#10417 closed Bugs (fixed)
Possible signed integer overflow in boost/polygon/detail/scan_arbitrary.hpp
| Reported by: | Owned by: | Andrii Sydorchuk | |
|---|---|---|---|
| Milestone: | Boost 1.58.0 | Component: | polygon |
| Version: | Boost Development Trunk | Severity: | Problem |
| Keywords: | Cc: |
Description
Caught by clang:
boost/polygon/detail/scan_arbitrary.hpp:174:33: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
as a result of min_y - 1 where min_y = -2147483648 = std::numeric_limits<int>::min()
Change History (2)
comment:1 by , 8 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 8 years ago
| Milestone: | To Be Determined → Boost 1.58.0 |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

Thanks you for the report!
I fix this particular issue and it was merged to the master branch of https://github.com/boostorg/polygon. The issue will be also fixed in Boost 1.58 release.
Please notice that in general it might be not safe to use -2147483648 for the coordinate as there is no +2147483648 value for int32 signed type.