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.
This commit is contained in:
szy
2013-08-07 19:27:29 +04:00
committed by bugmaster
parent 8263fcd384
commit fa13a85d92
11 changed files with 14 additions and 11 deletions

View File

@@ -110,13 +110,9 @@ Handle(TDataStd_BooleanArray) TDataStd_BooleanArray::Set(const TDF_Label&
void TDataStd_BooleanArray::SetValue (const Standard_Integer index,
const Standard_Boolean value)
{
#ifdef DEB
if (myValues.IsNull())
return;
if (index < myLower || index > myUpper)
return;
#endif
if (myValues.IsNull())
return;
Standard_Integer byte_index = (index - myLower) >> 3;
Standard_Integer degree = index - (byte_index << 3) - myLower;
Standard_Integer byte_value = DegreeOf2(degree);