Opened 4 years ago

Closed 4 years ago

#5135 closed defect (fixed)

Crash when setting width on integer field with Shapefile driver

Reported by: AlexGacon Owned by: warmerdam
Priority: high Milestone: 1.10.1
Component: OGR_SF Version: 1.10.0
Severity: major Keywords:
Cc:

Description

If you try to create a feature in a layer with a field of type integer on which the SetWidth? method has been called, the code crashed during the creation for the driver "ESRI Shapefile".

In the attached code:

  • By default, the code crashed
  • If you comment the SetWidth? method call, the code works
  • If you use another driver, the code works
  • If you use GDAL 1.9, the code works

Attachments (1)

TstGdal110.cpp (1.8 KB) - added by AlexGacon 4 years ago.
Test use for analyzing the bug

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by AlexGacon

Attachment: TstGdal110.cpp added

Test use for analyzing the bug

comment:1 Changed 4 years ago by Even Rouault

Milestone: 1.10.1
Resolution: fixed
Status: newclosed

The problem can indeed be reproduced when using a field width >= 20

Fixed in trunk (r26112) and branches/1.10 (r26113)

Note: See TracTickets for help on using tickets.