Opened 13 years ago
Closed 13 years ago
#4210 closed defect (fixed)
Error in printbuf.c
Reported by: | aestrada | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | geojson, jsonc |
Cc: |
Description
We came across an error in printbuf.c sprintbuf method call, the free(t) should be CPLFree(t); since a CPL function was used to allocate T. Doing a straight free in my testing is causing a heap error.
Change History (3)
comment:1 by , 13 years ago
Status: | new → assigned |
---|
comment:2 by , 13 years ago
This only shows up on Windows when building from dev studio. I have not seen the same thing when using makefiles on linux.
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
r23032 /trunk/gdal/port/cpl_string.cpp: CPLVASPrintf() : allocate *buf with CPLStrdup() to make the VSI debugging allocation routines happy, due to change done in r22983 (#4210)
I also believe the r22983 change is not necessary in normal conditions and does not need backporting. I'd assume that aestrada has included the jsonc code in its own project, or build his elasticsearch driver as a plugin.
Corrected in trunk (r22983).
How does it happen that in your environment free() and CPLFree() are doing something different? Are you building the geojson driver as a plugin with a different heap on windows?
My perception is that your problem will not come up commonly in which case there is little need to backport the fix to 1.8, but I'd like to know if it ought to be backported.