Opened 17 years ago

Closed 17 years ago

#1659 closed defect (fixed)

Fix in 8211

Reported by: caribou Owned by: warmerdam
Priority: normal Milestone: 1.4.2
Component: default Version: 1.4.1
Severity: normal Keywords:


There's a bug in gdal/frmts/iso8211/ddfrecord.cpp probably due to changes. Somebody forgot to take out a ftell and fseek. I would replace :

486 long pos = ftell(fp) - rewindSize;

487 fseek(fp, pos, SEEK_SET);


VSIFSeekL(fp, -rewindSize, SEEK_CUR);

Change History (1)

comment:1 by warmerdam, 17 years ago

Milestone: 1.4.2
Resolution: fixed
Status: newclosed
Version: svn-trunk1.4.1

Excellent point. I have patched it like this. For unfortunate reasons the vsi_l_offset type is normally unsigned so we can't actually use VSIFSeekL() properly to seek backwards using SEEK_CUR.

<         long pos = ftell(fp) - rewindSize;
<         fseek(fp, pos, SEEK_SET);
>         vsi_l_offset pos = VSIFTellL(fp) - rewindSize;
>         VSIFSeekL(fp, pos, SEEK_SET);

Change applied in 1.4.x and trunk.

Note: See TracTickets for help on using tickets.