Bug 448903. Fix bounds checking in blur code. r+sr=roc

This commit is contained in:
Michael Ventnor 2008-08-04 14:18:46 +12:00
parent 02656c20a0
commit f7783e7a9b
3 changed files with 7 additions and 1 deletions

View File

@ -3489,7 +3489,7 @@ nsContextBoxBlur::BoxBlurVertical(unsigned char* aInput,
for (PRUint32 i = 0; i < boxSize; i++) {
PRInt32 pos = i - aTopLobe;
pos = PR_MAX(pos, 0);
pos = PR_MIN(pos, stride - 1);
pos = PR_MIN(pos, rows - 1);
alphaSum += aInput[stride * pos + x];
}
for (PRUint32 y = 0; y < rows; y++) {

View File

@ -0,0 +1,5 @@
<!DOCTYPE html>
<html>
<head></head>
<body style="padding-left: 33554433em; padding-bottom: 33554433em; width: 20000px; text-decoration: underline; text-shadow: 2px 0px 158.33px green; text-indent: -33554433em;">Z</body>
</html>

View File

@ -138,3 +138,4 @@ load 418532-1.html
load 421404-1.html
load 425253-1.html
load 430352-1.html
load 448903-1.html