summaryrefslogtreecommitdiff
path: root/test/video_source.h
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2021-11-11 13:42:35 -0800
committerJames Zern <jzern@google.com>2021-11-11 13:43:29 -0800
commit7e4c6fed0c9b212dcee4787d461042c94dee4468 (patch)
treefab12d9bd118cf1021e0c1373d89774e557c938a /test/video_source.h
parentec80f88c5d05539c89f8bda8df571b66cab9566d (diff)
downloadlibvpx-7e4c6fed0c9b212dcee4787d461042c94dee4468.tar
libvpx-7e4c6fed0c9b212dcee4787d461042c94dee4468.tar.gz
libvpx-7e4c6fed0c9b212dcee4787d461042c94dee4468.tar.bz2
libvpx-7e4c6fed0c9b212dcee4787d461042c94dee4468.zip
test/DummyVideoSource::ReallocImage: check img_ alloc
prevents a crash on the next line accessing img_ members Bug: aomedia:3191 Change-Id: I430fb4ee662b0001629096eb8b554f8a2b30cce0
Diffstat (limited to 'test/video_source.h')
-rw-r--r--test/video_source.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/video_source.h b/test/video_source.h
index 2ba3f6421..7a2dbe7ef 100644
--- a/test/video_source.h
+++ b/test/video_source.h
@@ -191,6 +191,7 @@ class DummyVideoSource : public VideoSource {
void ReallocImage() {
vpx_img_free(img_);
img_ = vpx_img_alloc(NULL, format_, width_, height_, 32);
+ ASSERT_NE(img_, nullptr);
raw_sz_ = ((img_->w + 31) & ~31u) * img_->h * img_->bps / 8;
}