Bug 27477

Summary: Incorrect assertion in Vector::remove
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: Web Template FrameworkAssignee: Jessie Berlin <jberlin>
Status: RESOLVED FIXED    
Severity: Normal CC: jberlin, mrowe
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch that makes the assertion check for <= instead of just <. levin: review+

Description Jessie Berlin 2009-07-20 18:52:46 PDT
inline void Vector<T, inlineCapacity>::remove(size_t position, size_t length)
    {
        ASSERT(position < size());
        ASSERT(position + length < size());
        T* beginSpot = begin() + position;
        ....

Should be:

   inline void Vector<T, inlineCapacity>::remove(size_t position, size_t length)
    {
        ASSERT(position < size());
        ASSERT(position + length <= size());
        T* beginSpot = begin() + position;
        ....
Comment 1 Jessie Berlin 2009-07-20 19:36:52 PDT
Created attachment 33137 [details]
Patch that makes the assertion check for <= instead of just <.
Comment 2 Jessie Berlin 2009-07-20 20:10:03 PDT
commited with revision 46147