From badea3b30134b02c6502c8174719f2c984e37524 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 29 Oct 2020 22:35:52 -0400 Subject: vp9: Provide a default initializer for "hidden" member The API of VP9 exposes a WasFrameHidden() function which accesses this member. Given the constructor previously didn't initialize this member, it's a potential vector for an uninitialized read. Instead, we can initialize this to a deterministic value to prevent that from occurring. --- src/video_core/command_classes/codecs/vp9.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/command_classes/codecs/vp9.h b/src/video_core/command_classes/codecs/vp9.h index 3826f2c95..94e8f9090 100644 --- a/src/video_core/command_classes/codecs/vp9.h +++ b/src/video_core/command_classes/codecs/vp9.h @@ -159,7 +159,7 @@ private: std::array loop_filter_ref_deltas{}; std::array loop_filter_mode_deltas{}; - bool hidden; + bool hidden = false; s64 current_frame_number = -2; // since we buffer 2 frames s32 grace_period = 6; // frame offsets need to stabilize std::array frame_ctxs{}; -- cgit v1.2.3