From kde-commits Fri Mar 18 01:33:29 2011 From: Maks Orlovich Date: Fri, 18 Mar 2011 01:33:29 +0000 To: kde-commits Subject: =?utf-8?q?=5Bkdelibs=5D_khtml/ecma=3A_Don=27t_stackoverflow_on_p?= Message-Id: <20110318013329.11ACBA60B0 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=130041204825693 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)