[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdelibs=5D_khtml/ecma=3A_Don=27t_stackoverflow_on_p?=
From:       Maks Orlovich <maksim () kde ! org>
Date:       2011-03-18 1:33:29
Message-ID: 20110318013329.11ACBA60B0 () git ! kde ! org
[Download RAW message or body]

Git commit 6e6af077c95cc1006ff799b94cb819f7d894c6db by Maks Orlovich.
Committed on 21/02/2011 at 18:43.
Pushed by orlovich into branch 'master'.

Don't stackoverflow on put of out-of-bounds indexes in canvas pixel arrays

Really, the public index put and the virtual one ought to be the different
methods, with the virtual one private...

BUG: 266765

M  +3    -1    khtml/ecma/kjs_context2d.cpp     

http://commits.kde.org/kdelibs/6e6af077c95cc1006ff799b94cb819f7d894c6db

diff --git a/khtml/ecma/kjs_context2d.cpp b/khtml/ecma/kjs_context2d.cpp
index 2201042..de9870d 100644
--- a/khtml/ecma/kjs_context2d.cpp
+++ b/khtml/ecma/kjs_context2d.cpp
@@ -837,7 +837,9 @@ void CanvasImageDataArray::put(ExecState* exec, unsigned index, JSValue* value,
         return;
     }
 
-    JSObject::put(exec, index, value, attr);
+    // Must use the string version here since numberic one will fall back to
+    // us again.
+    JSObject::put(exec, Identifier::from(index), value, attr);
 }
 
 DOM::CanvasImageDataImpl* toCanvasImageData(ExecState* exec, JSValue* val)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic