| Bug #80499 | Out of range SRIDs are silently cast to uint32 | ||
|---|---|---|---|
| Submitted: | 24 Feb 2016 15:22 | Modified: | 28 Apr 2016 14:19 |
| Reporter: | Norvald Ryeng | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: GIS | Severity: | S3 (Non-critical) |
| Version: | 8.0.0 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[28 Apr 2016 14:19]
Paul DuBois
Posted by developer: Noted in 5.8.0 changelog. Geometry import functions that took an SRID parameter cast it to an unsigned 32-bit integer without warning or error, so negative values or values larger than unsigned 32-bit integer range were silently converted to a number within the range. Now, all geometry functions that take the SRID as a parameter check that it is within unsigned 32-bit integer range and produce an ER_DATA_OUT_OF_RANGE error if not. This also applies to GeoJSON and GeoHash functions that previously checked that the parameter was within range but returned a different error code.
[18 Jun 2016 21:36]
Omer Barnir
Posted by developer: Reported version value updated to reflect release name change from 5.8 to 8.0

Description: SRIDs that are outside the range of uint32 are silently interpreted as uint32 by ST_*FromText and ST_*FromWKB functions. How to repeat: SELECT ST_SRID(ST_GEOMFROMTEXT('POINT(0 0)',-1024)); Suggested fix: Raise an exception condition when SRIDs are out of range.