Opened 11 years ago

Closed 11 years ago

#5113 closed defect (fixed)

netcdf driver segfault when copying long metadata

Reported by: etourigny Owned by: etourigny
Priority: normal Milestone: 1.10.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: netcd, metadata
Cc:

Description

when a large metadata is copied to a netcdf file using CreateCopy() (specifically when it is > 8196) a segfault occurs. This is because the temporary string variable in CopyMetadata is a fixed size of NCDF_MAX_STR_LEN (8196).

Change History (3)

comment:1 by etourigny, 11 years ago

fixed in trunk (r26073) and added autotest (r26072)

comment:2 by etourigny, 11 years ago

the fix in (r26073) also adds a small optimization to NCDFGetAttr1, minimizing CPLRealloc for non-char attributes

comment:3 by etourigny, 11 years ago

Resolution: fixed
Status: newclosed

fixed in 1.10 (r26076)

Note: See TracTickets for help on using tickets.