summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-20 23:34:54 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-20 23:34:54 +0100
commit6c3db78c3d20ef064fa2a0ef38e65ca1ae69adb3 (patch)
tree32e802b1e96541601fecda4c8c57fe2a3550ef69
parentd25bff524306913e274153ecb44115e4e3696841 (diff)
Fix strange crash in verify().bv2.1-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.
-rw-r--r--src/verify.cc2
1 files changed, 1 insertions, 1 deletions
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<VerificationNote> notes;
- State state;
+ State state{};
vector<shared_ptr<DCP>> dcps;
for (auto i: directories) {