From 922e11a23dbafc19538705aa8b532394b933f25c Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 1 Apr 2020 05:17:24 +1100 Subject: [PATCH] frame: refuse to allocate if the video params are invalid --- app/codec/frame.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/app/codec/frame.cpp b/app/codec/frame.cpp index 34bb4d742..bc2ee45ab 100644 --- a/app/codec/frame.cpp +++ b/app/codec/frame.cpp @@ -109,6 +109,7 @@ void Frame::allocate() // Assume this frame is intended to be a video frame if (!params_.is_valid()) { qWarning() << "Tried to allocate a frame with invalid parameters"; + return; } data_.resize(PixelFormat::GetBufferSize(params_.format(), params_.width(), params_.height()));