Bug 27477 - Incorrect assertion in Vector::remove
Summary: Incorrect assertion in Vector::remove
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jessie Berlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-20 18:52 PDT by Jessie Berlin
Modified: 2009-07-20 20:10 PDT (History)
2 users (show)

See Also:


Attachments
Patch that makes the assertion check for <= instead of just <. (1.31 KB, patch)
2009-07-20 19:36 PDT, Jessie Berlin
levin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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