Fix out-of-bounds access in Gradient::sortStopsIfNecessary
authorAdam Klein <adamk@chromium.org>
Tue, 13 Sep 2011 03:55:41 +0000 (03:55 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Tue, 13 Sep 2011 18:24:05 +0000 (15:24 -0300)
commit495000284507ee5eb3a8ce115c5668a79501244a
treee13e3a5f31a4e5e368a256b00897b5113c009e14
parentc2fa30b7dd12a4023795bdb1299beb7aca17ffb7
Fix out-of-bounds access in Gradient::sortStopsIfNecessary
https://bugs.webkit.org/show_bug.cgi?id=67958

Reviewed by Darin Adler.

Reported by Valgrind in http://crbug.com/77049.

The errant code was added as an optimization in r67804.
This patch reverts that one, as all parties agree that the optimization
doesn't seem worthwhile, and there clearly aren't any tests covering
the special case.

No new tests, as existing tests should cover the remaining call to
|std::stable_sort|.

* platform/graphics/Gradient.cpp:
(WebCore::Gradient::sortStopsIfNecessary):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/Gradient.cpp