Opened 13 years ago
Closed 13 years ago
#3788 closed defect (fixed)
[VRT] GDALCreateCopy from VRT to VRT segfaults if the destination file cannot be created
Reported by: | bclaywell | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.3 |
Component: | GDAL_Raster | Version: | 1.7.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
The specialized code path that begins here in VRTCreateCopy is segfaulting for us if the destination file cannot be created (the CPLAssert on line 187 does not appear to be catching the NULL returned from fopen inside VSIFOpen). I'm not certain if this is a result of something specific to our build of GDAL that's undefining the CPLAssert macro?
We noticed this problem because we were attempting to call GDALCreateCopy on a VRT file in the vsimem file system, and along with the segfault we noticed that VRTCreateCopy uses the old-style VSIF{Open,Write,Close} rather than the vsimem-friendly *L versions.
Change History (2)
comment:1 by , 13 years ago
Owner: | changed from | to
---|
comment:2 by , 13 years ago
Component: | default → GDAL_Raster |
---|---|
Milestone: | → 1.7.3 |
Resolution: | → fixed |
Status: | new → closed |
Thanks for reporting.
r20880 /trunk/gdal/frmts/vrt/vrtdriver.cpp: VRT driver: fix crash in VRT to VRT translation when target file cannot be created; port to VSIF*L API; advertize GDAL_DCAP_VIRTUALIO=YES (#3788)
r20881 /branches/1.7/gdal/frmts/vrt/vrtdriver.cpp: VRT driver: fix crash in VRT to VRT translation when target file cannot be created; port to VSIF*L API; advertize GDAL_DCAP_VIRTUALIO=YES (#3788)