View Issue Details

IDProjectCategoryView StatusLast Update
0003513Open CASCADEOCCT:Application Frameworkpublic2013-12-19 13:57
ReportersrnAssigned Tobugmaster  
PrioritynormalSeveritytrivial 
Status closedResolutionfixed 
OSAll 
Target Version6.7.0Fixed in Version6.7.0 
Summary0003513: There is no check for boundary of array in method Set for array attributes
DescriptionIn methods Set of TDataStd_RealArray and TDataStd_IntegerArray there are no
check for boundary of arrays. So if new array is set on the same label method
Set will return the array with previous boundaries.
Additional information
and documentation updates
The next documentation note is added to 'Set (indx, value)' methods of classes holding arrays (cdl description):
"'OutOfRange' exception is raised if <Index> doesn't respect Lower or Upper bounds of the internal array.":
- TDataStd_ByteArray.cdl,
- TDataStd_BooleanArray.cdl,
- TDataStd_ExtStringArray.cdl,
- TDataStd_IntegerArray.cdl,
- TDataStd_RealArray.cdl,
- TDataStd_ReferenceArray.cdl.
TagsNo tags attached.
Test case numberNot needed

Activities

szy

2013-07-30 13:57

manager   ~0025204

Fixed.
Ready for reviewing.

szy

2013-07-30 13:58

manager   ~0025205

Branch CR3513

vro

2013-07-31 14:39

developer   ~0025210

Reviewed!

kgv

2013-07-31 16:18

developer   ~0025211

> -const TCollection_ExtendedString& TDataStd_ExtStringArray::Value (const Standard_Integer index) const 
> +TCollection_ExtendedString TDataStd_ExtStringArray::Value (const Standard_Integer index) const 

I suppose these changes unrelated to the bug description should be treated as:
- please use TDataStd_ExtStringArray::Array() to access stored strings without copying and have a lot/huge strings
- please port your code if you have accidentally used constructions like const TCollection_ExtendedString& aValue = aData->Value (theIndex);

szy

2013-07-31 16:59

manager   ~0025212

Last edited: 2013-07-31 17:08

The referred modification rather is a misprint as it is not supposed to be done.
Fixed.

mkv

2013-08-02 14:49

tester   ~0025226

Dear BugMaster,

Branch CR3513 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 190236cbcfdeaea91b8bcd262fc98e6931e83454

Number of compiler warnings:

occt component :
Linux: 953 (953 on master)
Windows: 959 (958 on master)

products component :
Linux: 189 (189 on master)
Windows: 288 (288 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 363934896 / 363701960
Total CPU difference: 48561.00000000113 / 45479.55000000069

Testing on Windows:
Total MEMORY difference: 363934896 / 363701960
Total CPU difference: 48561.00000000113 / 45479.55000000069

There are not differences in images found by testdiff.

Related Changesets

occt: master 42aa5ab9

2013-08-02 06:07:13

pkv

Details Diff
0003513: There is no check for boundary of array in method Set for array attributes Affected Issues
0003513
mod - src/BOPAlgo/BOPAlgo_Builder_3.cxx Diff File
mod - src/BOPDS/BOPDS_DS.cxx Diff File
mod - src/BOPDS/BOPDS_Iterator.cxx Diff File
mod - src/BOPDS/BOPDS_Tools.cdl Diff File
mod - src/BOPDS/BOPDS_Tools.lxx Diff File

occt: master 41d07631

2013-08-07 15:27:29

szy

Details Diff
0003513: There is no check for boundary of array in method Set for array attributes
- Added check of array's boundary in Set(i, val) methods.
- Added comments to cdl files.
- removed accidental modification in TDataStd_ExtStringArray::Value(i).
- recovering accidentally lost modifications.
Affected Issues
0003513
mod - src/TDataStd/TDataStd_BooleanArray.cdl Diff File
mod - src/TDataStd/TDataStd_BooleanArray.cxx Diff File
mod - src/TDataStd/TDataStd_ByteArray.cdl Diff File
mod - src/TDataStd/TDataStd_ByteArray.cxx Diff File
mod - src/TDataStd/TDataStd_ExtStringArray.cdl Diff File
mod - src/TDataStd/TDataStd_IntegerArray.cdl Diff File
mod - src/TDataStd/TDataStd_IntegerArray.cxx Diff File
mod - src/TDataStd/TDataStd_RealArray.cdl Diff File
mod - src/TDataStd/TDataStd_RealArray.cxx Diff File
mod - src/TDataStd/TDataStd_ReferenceArray.cdl Diff File
mod - src/TDataStd/TDataStd_ReferenceArray.cxx Diff File

occt: master fa13a85d

2013-08-07 15:27:29

szy


Committer: bugmaster Details Diff
0003513: There is no check for boundary of array in method Set for array attributes
- Added check of array's boundary in Set(i, val) methods.
- Added comments to cdl files.
- removed accidental modification in TDataStd_ExtStringArray::Value(i).
- recovering accidentally lost modifications.
Affected Issues
0003513
mod - src/TDataStd/TDataStd_BooleanArray.cdl Diff File
mod - src/TDataStd/TDataStd_BooleanArray.cxx Diff File
mod - src/TDataStd/TDataStd_ByteArray.cdl Diff File
mod - src/TDataStd/TDataStd_ByteArray.cxx Diff File
mod - src/TDataStd/TDataStd_ExtStringArray.cdl Diff File
mod - src/TDataStd/TDataStd_IntegerArray.cdl Diff File
mod - src/TDataStd/TDataStd_IntegerArray.cxx Diff File
mod - src/TDataStd/TDataStd_RealArray.cdl Diff File
mod - src/TDataStd/TDataStd_RealArray.cxx Diff File
mod - src/TDataStd/TDataStd_ReferenceArray.cdl Diff File
mod - src/TDataStd/TDataStd_ReferenceArray.cxx Diff File

Issue History

Date Modified Username Field Change
2011-08-02 10:32 bugmaster Category OCCT:OCAF => OCCT:Application Framework
2013-07-30 10:50 szy Assigned To bugmaster => szy
2013-07-30 10:50 szy Status new => assigned
2013-07-30 10:50 szy Fixed in Version EMPTY =>
2013-07-30 10:50 szy Description Updated
2013-07-30 13:57 szy Note Added: 0025204
2013-07-30 13:57 szy Assigned To szy => vro
2013-07-30 13:57 szy Status assigned => resolved
2013-07-30 13:58 szy Note Added: 0025205
2013-07-31 14:25 szy Additional Information Updated
2013-07-31 14:39 vro Note Added: 0025210
2013-07-31 14:39 vro Status resolved => reviewed
2013-07-31 16:07 mkv Assigned To vro => mkv
2013-07-31 16:18 kgv Note Added: 0025211
2013-07-31 16:59 szy Note Added: 0025212
2013-07-31 17:08 szy Note Edited: 0025212
2013-08-02 14:49 mkv Note Added: 0025226
2013-08-02 14:49 mkv Test case number => Not needed
2013-08-02 14:49 mkv Assigned To mkv => bugmaster
2013-08-02 14:49 mkv Status reviewed => tested
2013-08-07 19:46 bugmaster Target Version => 6.7.0
2013-08-09 11:49 pkv Changeset attached => occt master 42aa5ab9
2013-08-09 11:49 szy Changeset attached => occt master 41d07631
2013-08-09 11:49 szy Assigned To bugmaster => szy
2013-08-09 11:49 szy Status tested => verified
2013-08-09 11:49 szy Resolution open => fixed
2013-08-17 12:50 bugmaster Changeset attached => occt master fa13a85d
2013-08-17 12:50 bugmaster Assigned To szy => bugmaster
2013-12-19 13:52 bugmaster Status verified => closed
2013-12-19 13:57 bugmaster Fixed in Version => 6.7.0