]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: fix settings/cxxsupport.cc:525:40: runtime error: load of value 80, which is... 13468/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 8 Nov 2023 15:35:43 +0000 (16:35 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 10 Nov 2023 08:22:19 +0000 (09:22 +0100)
Mostly harmless

pdns/recursordist/settings/cxxsupport.cc

index efb328877ecf1b0b5f2f861fa392029f207123c1..2e58343bf4fd0ccc06c9772b36d4f6735576aab6 100644 (file)
@@ -518,7 +518,7 @@ static void processLine(const std::string& arg, FieldMap& map, bool mainFile)
   ::rust::String section;
   ::rust::String fieldname;
   ::rust::String type_name;
-  pdns::rust::settings::rec::Value rustvalue;
+  pdns::rust::settings::rec::Value rustvalue = {false, 0, 0.0, "", {}, {}, {}};
   if (pdns::settings::rec::oldKVToBridgeStruct(var, val, section, fieldname, type_name, rustvalue)) {
     auto overriding = !mainFile && !incremental && !simpleRustType(type_name);
     auto [existing, inserted] = map.emplace(std::pair{std::pair{section, fieldname}, pdns::rust::settings::rec::OldStyle{section, fieldname, var, type_name, rustvalue, overriding}});
@@ -618,8 +618,7 @@ std::string pdns::settings::rec::defaultsToYaml()
     ::rust::String section;
     ::rust::String fieldname;
     ::rust::String type_name;
-    pdns::rust::settings::rec::Value rustvalue;
-
+    pdns::rust::settings::rec::Value rustvalue{false, 0, 0.0, "", {}, {}, {}};
     string name = var;
     string val = arg().getDefault(var);
     if (pdns::settings::rec::oldKVToBridgeStruct(name, val, section, fieldname, type_name, rustvalue)) {