Opened 16 years ago
Closed 16 years ago
#1973 closed defect (fixed)
OGRSpatialReference::exportToUSGS does not handle the case of undefined DOMAIN
Reported by: | Ari Jolma | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SRS | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | dron |
Description
As in the short summary: GetAttrValue("DOMAIN") may return null but this is not handled in the method.
Change History (4)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
Oh, sorry, I meant DATUM. PROJECTION (pszProjection) is tested but DATUM not.
And, yes, I mean that GetAttrValue may return NULL at any time.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I am late on that, but it is now fixed both in trunk and 1.4 branches.
Note:
See TracTickets
for help on using tickets.
Ari,
I'm afraid I don't understand your point. I searched ogr_srs_usgs.cpp for any mention of DOMAIN and didn't find one. The OGRSpatialReference::GetAttrValue() method returns NULL if a value is requested but is not found.
Is "DOMAIN" something special in the context of exportToUSGS()?
Or is your point that if any of the attributes fetched using GetAttrValue() in exportToUSGS() is not found (like DATUM, etc) then the code will crash because the returned NULL pointer is used?