Merge pull request #2904 from DarDoro/master

floodFill buffer overflow prevention, issue #2903
snap7
Jens Mönig 2021-10-29 08:07:04 +02:00 zatwierdzone przez GitHub
commit 000aef871b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -5572,8 +5572,8 @@ SpriteMorph.prototype.floodFill = function () {
img = ctx.getImageData(0, 0, width, height),
dta = img.data,
stack = [
Math.round((height / 2) - this.yPosition()) * width +
Math.round(this.xPosition() + (width / 2))
Math.floor((height / 2) - this.yPosition()) * width +
Math.floor(this.xPosition() + (width / 2))
],
current,
src;