Commit 6020d2aa authored by Frank Barchard's avatar Frank Barchard

fix off by one in unitest BenchmarkARGBDetect_Unaligned where array is initialized beyond end by 1.

TBR=harryjin@google.com
BUG=libyuv:595
TESTED=local unittest passes on try bots

Review URL: https://codereview.chromium.org/2012603002 .
parent 74a69522
...@@ -179,8 +179,8 @@ TEST_F(LibYUVBaseTest, BenchmarkARGBDetect_Unaligned) { ...@@ -179,8 +179,8 @@ TEST_F(LibYUVBaseTest, BenchmarkARGBDetect_Unaligned) {
uint32 fourcc; uint32 fourcc;
const int kMaxTest = benchmark_width_ * benchmark_height_ * 4 + 1; const int kMaxTest = benchmark_width_ * benchmark_height_ * 4 + 1;
align_buffer_64(src_a, kMaxTest); align_buffer_64(src_a, kMaxTest);
for (int i = 0; i < kMaxTest; ++i) { for (int i = 1; i < kMaxTest; ++i) {
src_a[i + 1] = 255; src_a[i] = 255;
} }
src_a[0 + 1] = 0; src_a[0 + 1] = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment