Opened 13 years ago

Closed 13 years ago

#1776 closed defect (fixed)

OGR_L_CreateField does not validate the submitted field defn

Reported by: Ari Jolma Owned by: Mateusz Łoskot
Priority: normal Milestone: 1.5.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc: warmerdam


ogrlayer.cpp:454 should probably call VALIDATE_POINTER(hField)

Change History (5)

comment:1 Changed 13 years ago by warmerdam

Cc: warmerdam added
Milestone: 1.5.0
Owner: changed from warmerdam to Mateusz Łoskot

Skimming a few files (ogr_api.cpp, ogrlayer.cpp) it doesn't seem like validation has been incorporated into the OGR code yet.

Mateusz, as time permits could you continue to work on this? I think there will be C callable functions implemented in gdal/ogr and gdal/ogr/ogrsf_frmts/generic. You can skim ogr/ogr_api.h to get an idea if you have found them all.

comment:2 Changed 13 years ago by Mateusz Łoskot

Status: newassigned

comment:3 Changed 13 years ago by Mateusz Łoskot

I applied fix for the reported issue (r12035, r12036).

I will continue adding validation to other calls as Frank suggests.

comment:4 Changed 13 years ago by Mateusz Łoskot

The whole C API in gdal/ogr and gdal/ogr/ogrsf_frmts/generic module has been updated with validation (r12037 and minor update in r12038).

comment:5 Changed 13 years ago by Mateusz Łoskot

Resolution: fixed
Status: assignedclosed


Note: See TracTickets for help on using tickets.