Opened 13 years ago
Closed 13 years ago
#1824 closed defect (fixed)
Calling CCoordinateSystemTransform::GetGeodeticTransformation() causes Assertion in debug mode and/or is prone to access violations
Reported by: | baertelchen | Owned by: | baertelchen |
---|---|---|---|
Priority: | low | Milestone: | 2.3 |
Component: | General | Version: | 2.1.0 |
Severity: | trivial | Keywords: | CoordinateSystem API MgCoordinateSystemTransform GetGeodeticTransformation NumberOfGeodeticTransformations |
Cc: | External ID: |
Description
The code in CCoordinateSystemTransform::GetGeodeticTransformation() sets an emtpy wstring object to '\0' at index 0 what causes an assertion in debug mode.
Not even that setting the string to "empty" is unnecessary, it's also prone to access violations in release builds.
Also, the documentation says "...Returns a disposable pointer to the geodetic transformation definition indicated by the index parameter. A null pointer is returned if the index parameter is zero..."
Passing in 0 is absolutely valid, however.
This ticket is about fixing 2 things:
- the documentation of the methods [NumberOfGeodeticTransformations] and [GetGeodeticTransformation]
- remove / fix the implementation of [GetGeodeticTransformation] so it least doesn't resets the empty string via the indexing parameter
Change History (2)
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in revision 6166 (Wednesday, 10/05/2011).