DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24714>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24714 ValueVectorOf::insertElementAt does not ensure capacity Summary: ValueVectorOf::insertElementAt does not ensure capacity Product: Xerces-C++ Version: 2.3.0 Platform: All OS/Version: All Status: NEW Severity: Major Priority: Other Component: Utilities AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In ValueVectorOf, it is only checked if the position of the element to be inserted is within the range of current elements, but not if there is enough capacity to insert the element. To reproduce the problem: - create ValueVectorOf with initial capacity of 1 - insertAt(0) will work for the 1st time, as addElement is called - next insertAt(0) causes crash in the loop moving element from 0 to 1 insertAt works in this case, if addElement and removeElement are called before, as then space for 1 element is left. Calling ensureExtraCapacity(1); before moving the existing elements will solve the problem. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
