Opened 15 years ago
Closed 15 years ago
#2980 closed defect (fixed)
[PATCH] Remove (char *) casts in ogrgeoconceptdatasource.cpp
Reported by: | Even Rouault | Owned by: | dgrichard |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | geoconcept |
Cc: | Even Rouault |
Description
Didier,
In the process of fixing a small memory leak of _pszExt, I've found that the current code could potentially free const char* strings that are currently casted to char*.
I've attached a patch that removes all those unnecessary and potentially dangerous (char *) casts. I also think there was a bug in LoadFile() when testing for the extensions and CPLStrdup'ing them. I've just removed it, but that may be incorrect.
ogr_geoconcept.py still passes, but you should check that everything is still OK for you. I let you apply if you think it's appropriate.
Attachments (1)
Change History (5)
by , 15 years ago
Attachment: | geoconcept_cleanup_charstar_casts.patch added |
---|
follow-up: 3 comment:1 by , 15 years ago
comment:2 by , 15 years ago
Status: | new → assigned |
---|
comment:3 by , 15 years ago
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Even,
Checked patch. Ok for me. I'll commit the changes along with another on geoconcept.h raised by gcc 4.2. Do you agree ?
didier