From 6c3db78c3d20ef064fa2a0ef38e65ca1ae69adb3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 20 Jan 2021 23:34:54 +0100 Subject: Fix strange crash in verify(). This appears to be necessary to stop the first write to state.subtitle_language from segfaulting. It looks like the optional<> is in some uninitialised / indeterminate state. I could only reproduce this crash when running verify() from DoM, not from the `dcpverify` tool. And some simple test programs suggest that even doing State state; should call the constructors of anything in State. --- src/verify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/verify.cc b/src/verify.cc index b1d59c98..3e584ba0 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1044,7 +1044,7 @@ dcp::verify ( xsd_dtd_directory = boost::filesystem::canonical (xsd_dtd_directory); vector notes; - State state; + State state{}; vector> dcps; for (auto i: directories) { -- cgit v1.2.3