ref: 2930903d51ab4a10c162f8703154442ce0127adb
parent: ef5918098d5c7f8ffda960274e3f8e38f02cb487
author: James Zern <jzern@google.com>
date: Sat Apr 29 09:12:53 EDT 2017
vpx_scale_test: fix segfault on alloc failure check the return of ResetImage() before continuing Change-Id: Iff0b038f7b9761113b8cf33a511a5306640d1273
--- a/test/vpx_scale_test.cc
+++ b/test/vpx_scale_test.cc
@@ -178,7 +178,7 @@
static const int kSizesToTest[] = { 1, 15, 33, 145, 512, 1025, 16383 };
for (int h = 0; h < kNumSizesToTest; ++h) {
for (int w = 0; w < kNumSizesToTest; ++w) {
- ResetImage(kSizesToTest[w], kSizesToTest[h]);
+ ASSERT_NO_FATAL_FAILURE(ResetImage(kSizesToTest[w], kSizesToTest[h]));
ExtendBorder();
ReferenceExtendBorder();
CompareImages(img_);
@@ -217,7 +217,7 @@
static const int kSizesToTest[] = { 1, 15, 33, 145, 512, 1025, 16383 };
for (int h = 0; h < kNumSizesToTest; ++h) {
for (int w = 0; w < kNumSizesToTest; ++w) {
- ResetImage(kSizesToTest[w], kSizesToTest[h]);
+ ASSERT_NO_FATAL_FAILURE(ResetImage(kSizesToTest[w], kSizesToTest[h]));
ReferenceCopyFrame();
CopyFrame();
CompareImages(cpy_img_);