Opened 15 years ago
Closed 15 years ago
#2629 closed defect (fixed)
MrSID SerializeMetadataRec uses bad int sizes on 64-bit compile
Reported by: | jburgess777 | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.4 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | mrsid |
Cc: |
Description
I ran Valgrind on some software reading a MrSid format file using GDAL and it reported that MrSIDDataset::SerializeMetadataRec() was reading memory beyond the size that had been allocated.
==12016== Invalid read of size 8 ==12016== at 0xD6D7054: MrSIDDataset::SerializeMetadataRec(LizardTech::LTIMetadataRecord const*) (mrsiddataset.cpp:962) ... ==12016== Invalid read of size 8 ==12016== at 0xD6D715C: MrSIDDataset::SerializeMetadataRec(LizardTech::LTIMetadataRecord const*) (mrsiddataset.cpp:959)
This error occurs because the current code casts the 32 bit data to a 'long *' which is a 64-bit type on x86-64. Changing these to GInt32/GUInt32 fixes it.
Attachments (1)
Change History (3)
by , 15 years ago
Attachment: | gdal-mrsid-64bit-fix.patch added |
---|
comment:1 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 15 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | mrsid added |
Milestone: | → 1.5.4 |
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Patch replacing long type with GInt32