DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0022947

XCAFPrs_AISObject.cxx: array index out of bounds ...

CommunityOCCT:Data Exchangeclosed7 public notes

Search issues

Description

In the line 96 an array index exceeding array size is used:

B.Get(X[1], Y[1], Z[1], X[2], Y[2], Z[2]);

Change the line to:

B.Get(X[0], Y[0], Z[0], X[1], Y[1], Z[1]);

Besides, only 10 fields of the 'Indx' array are assigned in lines 93-96

Indx [0]=1;Indx [1]=2;Indx [2]=3;Indx [3]=4;Indx [4]=5;Indx [5]=6;Indx [6]=7;
Indx [7]=8;Indx [8]=1;Indx [9]=2;Indx [10]=6;Indx [10]=5;Indx [10]=3;
Indx [10]=4;Indx [10]=8;Indx [10]=7;

Public activity

7 archived notes

Participants are labeled by their role within this record.

01Commenter 1
The dirty code has been copied from AIS_Shape.cxx while #define that activated good part of that code has been lost... To be fixed. Please consider possibility of re-using implementation of method DisplayBox() of AIS_Shape instead of having a copy.
02Commenter 2
DisplayBox function has been removed from XCAFPrs_AISObject.cxx

Branch http://svn/svn/occt/branches/OCC22947 is ready to be reviewed.

Dear Andrey,
Please review.
03Commenter 3
No remarks, please test
04Commenter 4
Dear Commenter 1,
Workbench KAS:dev:mkv-22947-occt was created from SVN branch http://svn/svn/occt/branches/OCC22947
(and mkv-22947-products from trunk) and compiled on Linux platform.
05Commenter 5
Dear Commenter 1,
Workbench mkv-22947-occt was created from SVN branch http://svn/svn/occt/branches/OCC22947
(and mkv-22947-products from trunk) and compiled on Linux platform.

There are not regressions in mkv-22947-products regarding to KAS:dev:products-20120127-opt

See results in /QADisk/occttests/results/KAS/dev/mkv-22947-products_14022012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120127-opt_28012012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification

06Commenter 1
Integrated into trunk of repository

Date: 2012-02-17 11:19:03 +0400 (Fri, 17 Feb 2012)
New Revision: 10492

Modified:
   trunk/src/XCAFPrs/XCAFPrs_AISObject.cxx
07Author
Verified. Please close.

Related records