Commit 099220bc authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Fix a buffer over-read

Change in this commit is suggesed by Tim Terriberry.

BUG=aomedia:413

Change-Id: I4f79fd30d65d984ea4a1fe069bb715937856721f
parent a04cd932
......@@ -58,7 +58,7 @@ TEST(AV1, TestPrimitiveRefbilivel) {
}
aom_stop_encode(&bw);
aom_reader br;
aom_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
aom_reader_init(&br, bw_buffer, bw.pos, NULL, NULL);
GTEST_ASSERT_GE(aom_reader_tell(&br), 0u);
GTEST_ASSERT_LE(aom_reader_tell(&br), 1u);
for (int n = 0; n < kRanges; ++n) {
......@@ -108,7 +108,7 @@ TEST(AV1, TestPrimitiveRefsubexpfin) {
}
aom_stop_encode(&bw);
aom_reader br;
aom_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
aom_reader_init(&br, bw_buffer, bw.pos, NULL, NULL);
GTEST_ASSERT_GE(aom_reader_tell(&br), 0u);
GTEST_ASSERT_LE(aom_reader_tell(&br), 1u);
for (int n = 0; n < kRanges; ++n) {
......
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