Issue 161: Out of bound value behaviour for _maximum and _length in sequences (c_mapping-rtf) Source: (, ) Nature: Uncategorized Severity: Medium Summary: Summary: Section 14.11. Para 6 indicates error to set _length or _maximum member larger than specified bound. Say "If the _length and _maximum members are set to a value larger than specified...." Resolution: replace sentence Revised Text: Proposed fix: Add the sentence to the paragraph Actions taken: October 10, 1996: received issue October 5, 2000: closed issue Discussion: This is now section 1.11 in the June 1999 edition and the sentence still exists. In full the sentence in question reads "For bounded sequences, it is an error to set the _length or _maximum member to a value larger than the specified bound." The issue seems to be suggesting that the spec would be clearer or more complete if we stated a problem and then went on to state the consequence of the error. However, the consequences of the error can be well defined. Replace sentence with: If the _length or _maximum members are set to values that are larger than the size of a bounded sequence or larger than the allocated space for a unbounded buffer then the result is undefined behavior. End of Annotations:===== Issue 161: Out of bound value behaviour for _maximum and _length in sequences Summary: Section 14.11. Para 6 indicates error to set _length or _maximum member larger than specified bound. Say "If the _length and _maximum members are set to a value larger than specified...." Discussion - This is now section 1.11 in the June 1999 edition and the sentence still exists. In full the sentence in question reads "For bounded sequences, it is an error to set the _length or _maximum member to a value larger than the specified bound." The issue seems to be suggesting that the spec would be clearer or more complete if we stated a problem and then went on to state the consequence of the error. It would be nice to say "if you set length or maximum bigger than the buffer or bound size a hand will come out of the sky and stop the bad coding." But I don't think the consequences of the error will can be well defined. Further I think it would be out of scope for the RFP to specify that the ORB should test for these conditions. The C++ Language mapping has edited the sentence to read "For a bounded sequence, attempting to set the current length to a value larger than the maximum length given in the OMG IDL specification produces undefined behavior." But the C problem is actually more general that is the C++ problem. In C one could set the length or maximum larger than the allocated size of an unbounded sequence where in C++ the 'class' can prevent that. I propose we change the sentence to: "If the _length or _maximum members are set to values that are larger than the size of a bounded sequence or larger than the allocated space for a unbounded buffer then the result is undefined behavior."