Ticket #109 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

sterea crashes in freeup with bad ellipse

Reported by: gaige Owned by: warmerdam
Priority: major Milestone: 4.8.0
Component: Core Version: 4.7.0
Keywords: Cc:

Description (last modified by warmerdam) (diff)

In PJ_sterea.c:

If FREEUP is called after a failed initialization, and before P->en is initialized (such as would be the case if this erroneous string were passed to init:

+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000+ellps=GRS80 +units=m +no_defs

(note the lack of space between the +y_0 parm and the +ellps)

Then the free is called on an uninitialized memory, which on my machine is non-zero. Fix is to replace the ENTRY0(sterea) with:

ENTRYA(sterea)
    P->en=0;
ENTRYX

Change History

Changed 2 years ago by warmerdam

  • status changed from new to closed
  • resolution set to fixed
  • component changed from default to Core
  • description modified (diff)
  • milestone set to 4.8.0

Patch applied in trunk (r2022).

thanks!

Note: See TracTickets for help on using tickets.