[argyllcms] Out of bounds at gamut/isecvol.c

  • From: Jörg Frings-Fürst <debian@xxxxxxxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Sun, 03 May 2015 12:37:04 +0200

Hi,

I have found some out of bounds errors:

Line 205:

Array 'tp1.v[3]' accessed at index 3, which is out of bounds

For line 205:

[quote]
struct _gtri {
BSP_STRUCT
int n; /* Serial number */
struct _gvert *v[3]; /* Verticies in cw order */
struct _gedge *e[3]; /* Edges v[n] - v[n+1] */
int ei[3]; /* Index within edge structure of this
triangle [0..1] */

double pe[4]; /* Vertex plane equation (absolute) */
/* (The first three elements is
the unit normal vector to the plane, */
/* which points inwards) */
double che[4]; /* convex hull testing triangle plane equation
(relative) */
double spe[4]; /* sphere mapped triangle plane equation
(relative) */
double ee[3][4]; /* sphere sp[] Edge triangle plane equations
for opposite edge (relative) */

int sort; /* lookup: Plane sorting result for
each try */
int bsort; /* lookup: Current best tries sort */

unsigned int touch; /* nn: Per value touch count */
double mix[2][3]; /* nn: Bounding box min and max */

double area; /* Area - computed by nssverts() */
int ssverts; /* Number of stratified sampling verts needed -
computed by nssverts() */

LINKSTRUCT(struct _gtri); /* Linked list structure */
}; typedef struct _gtri gtri;


gtri *tp1, *tp2;

opv->tp1.v[j];
[/quote]

j runs outside the for loops from 0 to 3;
tp1.v[j] is only defined from 0 to 2.


CU
Jörg


--
New:
GPG Fingerprint: 63E0 075F C8D4 3ABB 35AB 30EE 09F8 9F3C 8CA1 D25D
GPG key (long) : 09F89F3C8CA1D25D
GPG Key : 8CA1D25D
CAcert Key S/N : 0E:D4:56

Old pgp Key: BE581B6E (revoked since 2014-12-31).

Jörg Frings-Fürst
D-54526 Niederkail

Threema: SYR8SJXB

IRC: j_f-f@xxxxxxxxxxxx
j_f-f@xxxxxxxx

My wish list:
- Please send me a picture from the nature at your home.


Attachment: signature.asc
Description: This is a digitally signed message part

Other related posts:

  • » [argyllcms] Out of bounds at gamut/isecvol.c - Jörg Frings-Fürst