Opened 12 years ago

Last modified 12 years ago

#4836 closed defect

[patch] OCTTransform and OCTTransformEx do not check for NULL pointer — at Version 2

Reported by: Leith Bade Owned by: warmerdam
Priority: normal Milestone: 1.10.0
Component: OGR_SRS Version: svn-trunk
Severity: normal Keywords: OCTTransform OCTTransformEx
Cc:

Description (last modified by Leith Bade)

I discovered a bug in OCTTransform and OCTTransformEx.

The functions do not check if hTransform is NULL before they call hTransform->Transform().

As such if the caller passes in NULL (say because creating the coordinate transformation failed on some previous step) the program crashes.

I have attached a patch against latest SVN trunk.

The code compiles but I was not able to autotest it as trunk autotest was crashing my Python.

Change History (3)

by Leith Bade, 12 years ago

Attachment: ogrct.cpp.patch added

Patch for ogrct.cpp

comment:1 by Leith Bade, 12 years ago

Summary: OCTTransform and OCTTransformEx do not check for NULL pointer[patch] OCTTransform and OCTTransformEx do not check for NULL pointer

comment:2 by Leith Bade, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.