Opened 14 years ago
Closed 14 years ago
#3705 closed defect (fixed)
Index out of range in VizGeorefSpline2D function.
Reported by: | Mateusz Łoskot | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | |
Cc: |
Description
The for loop in file thinplatespline.h:74 has 3 static iterations:
for ( int i = 0; i < 3; i++ ) rhs[i][v] = 0.0;
and with rhs being defined as
#define VIZGEOREF_MAX_VARS 2 double *rhs[VIZGEOREF_MAX_VARS];
leads to index out of range.
Note:
See TracTickets
for help on using tickets.
r20193 /trunk/gdal/alg/thinplatespline.h: Fix index out of range in thinplatespline.h (no bad effect was seen previously since rhs and coef should generally be packed one after the other one by the compiler) (#3705)
I completely removed the loop since grow_points() already takes care of zero'ing with VSICalloc. I also fixed the dump_data_points() which was inverting the order of the indices too (this function is unused)