Opened 16 years ago

Closed 16 years ago

#2586 closed defect (fixed)

pointer vrs int size on 64 bit systems alg/gdalsimplewarp.cpp

Reported by: winkey Owned by: warmerdam
Priority: normal Milestone: 1.5.3
Component: default Version: svn-trunk
Severity: normal Keywords: gdalsimplewarp
Cc:

Description

couple instances where memory is allocated with sizeof(int) for pointers

lines 128 and 152 gdalsimplewarp.cpp

0==894== Invalid write of size 8
==894==    at 0x5004C30: GDALSimpleImageWarp (gdalsimplewarp.cpp:131)
==894==    by 0x500553F: GDALSimpleImageWarp (gdalsimplewarp.cpp:107)
==894==    by 0x401ABD: gdalwarpsimple (gdalwarpsimple.c:157)
==894==    by 0x401796: main (main.c:83)
==894==  Address 0x6234AF8 is 8 bytes inside a block of size 12 alloc'd
==894==    at 0x4A04B32: calloc (vg_replace_malloc.c:279)
==894==    by 0x4FE1934: CPLCalloc (cpl_conv.cpp:80)
==894==    by 0x5004BF1: GDALSimpleImageWarp (gdalsimplewarp.cpp:128)
==894==    by 0x500553F: GDALSimpleImageWarp (gdalsimplewarp.cpp:107)
==894==    by 0x401ABD: gdalwarpsimple (gdalwarpsimple.c:157)
==894==    by 0x401796: main (main.c:83)
==894== 
==894== Invalid write of size 8
==894==    at 0x50051B1: GDALSimpleImageWarp (gdalsimplewarp.cpp:155)
==894==    by 0x500553F: GDALSimpleImageWarp (gdalsimplewarp.cpp:107)
==894==    by 0x401ABD: gdalwarpsimple (gdalwarpsimple.c:157)
==894==    by 0x401796: main (main.c:83)
==894==  Address 0x6138DA8 is 8 bytes inside a block of size 12 alloc'd
==894==    at 0x4A04B32: calloc (vg_replace_malloc.c:279)
==894==    by 0x4FE1934: CPLCalloc (cpl_conv.cpp:80)
==894==    by 0x5005188: GDALSimpleImageWarp (gdalsimplewarp.cpp:152)
==894==    by 0x500553F: GDALSimpleImageWarp (gdalsimplewarp.cpp:107)
==894==    by 0x401ABD: gdalwarpsimple (gdalwarpsimple.c:157)
==894==    by 0x401796: main (main.c:83)

Change History (1)

comment:1 by warmerdam, 16 years ago

Keywords: gdalsimplewarp added
Milestone: 1.5.3
Resolution: fixed
Status: newclosed

Two incorrect allocations corrected in trunk (r15432) and 1.5 branch (r15433).

Note: See TracTickets for help on using tickets.