Opened 17 years ago

Last modified 17 years ago

#892 closed defect (fixed)

VRT ColorInterp=palette without defining palette causes segfault

Reported by: chodgson@… Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:


A simple .vrt defining a band with a palette color interpretation causes a
segfault when inspected by gdalinfo - it outputs the first part of it's usually
output, then segfaults when it is about to output the palette info. I expect
that this is due to not also defining the palette in the vrt file. Here is the
vrt file I used:

<VRTDataset rasterXSize="512" rasterYSize="512">
 <GeoTransform>0, 0.3515625, 0.0, 0, 0.0, 0.17578125</GeoTransform>
 <VRTRasterBand dataType="Byte" band="1">
   <SourceFilename relativeToVRT="1">test.png</SourceFilename>
   <SrcRect xOff="0" yOff="0" xSize="256" ySize="256"/>
   <DstRect xOff="0" yOff="0" xSize="256" ySize="256"/>

I believe the actual image file "test.png" is unimportant - I've received the
segfault from both .gif and .png files, and changing the colorinterp to "red" in
the vrt allows gdalinfo to work properly.

Change History (1)

comment:1 by warmerdam, 17 years ago


I have fixed gdalinfo to not crash in this situation.

Note: See TracTickets for help on using tickets.