Opened 17 years ago

Closed 17 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

Description

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

Change History (5)

comment:1 by warmerdam, 17 years ago

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 by Mateusz Łoskot, 17 years ago

Status: newassigned

comment:3 by Mateusz Łoskot, 17 years ago

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

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

comment:4 by Mateusz Łoskot, 17 years ago

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 by Mateusz Łoskot, 17 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Note: See TracTickets for help on using tickets.