Opened 12 years ago

Closed 12 years ago

#4324 closed defect (fixed)

Nitfs containing multiple copies of the same TRE result in memory corruption on write.

Reported by: jeepingben Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: nitf
Cc:

Description

Changeset 22866 added support for carrying multiple copies of a TRE in a nitfdataset by adding _2, _3, etc to the end of the name when storing them as metadata. The _2, _3, etc is not stripped when writing the TRE back to a nitf. This overruns the buffer at nitffile.c:1194 and results in writing incorrect nitfs.

Attachments (1)

U_4020H.r7 (8.6 KB ) - added by jeepingben 12 years ago.
nitf with duplicate tags

Download all attachments as: .zip

Change History (2)

by jeepingben, 12 years ago

Attachment: U_4020H.r7 added

nitf with duplicate tags

comment:1 by Even Rouault, 12 years ago

Component: defaultGDAL_Raster
Keywords: nitf added
Resolution: fixed
Status: newclosed

r23304 /trunk/gdal/frmts/nitf/nitffile.c: NITF: truncate TRE name to 6 character (#4324)

Note: See TracTickets for help on using tickets.