Merge "Replace firmware build time with epoch" into main
diff --git a/src/adaptations/device-layer/Fuchsia/Logging.cpp b/src/adaptations/device-layer/Fuchsia/Logging.cpp
index 02c3e48..d878ec1 100644
--- a/src/adaptations/device-layer/Fuchsia/Logging.cpp
+++ b/src/adaptations/device-layer/Fuchsia/Logging.cpp
@@ -46,28 +46,29 @@
         char module_name[nlWeaveLoggingModuleNameLen + 1];
         ::GetModuleName(module_name, module);
 
-        syslog::LogSeverity severity = syslog::LOG_INFO;
+        fuchsia_logging::LogSeverity severity = fuchsia_logging::LOG_INFO;
         switch (category)
         {
         case kLogCategory_Error:
-            severity = syslog::LOG_ERROR;
+            severity = fuchsia_logging::LOG_ERROR;
             break;
         case kLogCategory_Progress:
-            severity = syslog::LOG_INFO;
+            severity = fuchsia_logging::LOG_INFO;
             break;
         case kLogCategory_Detail:
         case kLogCategory_Retain:
-            severity = syslog::LOG_DEBUG;
+            severity = fuchsia_logging::LOG_DEBUG;
             break;
         }
 
-        if (!syslog::ShouldCreateLogMessage(severity)) {
+        if (!fuchsia_logging::ShouldCreateLogMessage(severity))
+        {
             return;
         }
 
         const char * file_basename = strrchr(file, '/');
-        file_basename = file_basename ? file_basename + 1 : file;
-        syslog::LogMessage(severity, file_basename, line, nullptr, nullptr).stream()
+        file_basename              = file_basename ? file_basename + 1 : file;
+        fuchsia_logging::LogMessage(severity, file_basename, line, nullptr, nullptr).stream()
             << "[" << module_name << "] " << formattedMsg;
     }
 }
@@ -94,4 +95,4 @@
 } // namespace Weave
 } // namespace nl
 
-#endif //#if WEAVE_LOGGING_STYLE_EXTERNAL
+#endif // #if WEAVE_LOGGING_STYLE_EXTERNAL
diff --git a/src/adaptations/device-layer/Fuchsia/minimal/Logging.cpp b/src/adaptations/device-layer/Fuchsia/minimal/Logging.cpp
index df64d4d..3e9ad83 100644
--- a/src/adaptations/device-layer/Fuchsia/minimal/Logging.cpp
+++ b/src/adaptations/device-layer/Fuchsia/minimal/Logging.cpp
@@ -14,10 +14,9 @@
 namespace Logging {
 namespace {
 constexpr size_t kFormattedMessageSize = 256;
-}  // namespace
+} // namespace
 
-void Log(uint8_t module, uint8_t category, const char * file, uint32_t line, const char * msg,
-         va_list v)
+void Log(uint8_t module, uint8_t category, const char * file, uint32_t line, const char * msg, va_list v)
 {
     if (IsCategoryEnabled(category))
     {
@@ -27,28 +26,29 @@
         char module_name[nlWeaveLoggingModuleNameLen + 1];
         GetModuleName(module_name, module);
 
-        syslog::LogSeverity severity = syslog::LOG_INFO;
+        fuchsia_logging::LogSeverity severity = fuchsia_logging::LOG_INFO;
         switch (category)
         {
         case kLogCategory_Error:
-            severity = syslog::LOG_ERROR;
+            severity = fuchsia_logging::LOG_ERROR;
             break;
         case kLogCategory_Progress:
-            severity = syslog::LOG_INFO;
+            severity = fuchsia_logging::LOG_INFO;
             break;
         case kLogCategory_Detail:
         case kLogCategory_Retain:
-            severity = syslog::LOG_DEBUG;
+            severity = fuchsia_logging::LOG_DEBUG;
             break;
         }
 
-        if (!syslog::ShouldCreateLogMessage(severity)) {
+        if (!fuchsia_logging::ShouldCreateLogMessage(severity))
+        {
             return;
         }
 
         const char * file_basename = strrchr(file, '/');
-        file_basename = file_basename ? file_basename + 1 : file;
-        syslog::LogMessage(severity, file_basename, line, nullptr, nullptr).stream()
+        file_basename              = file_basename ? file_basename + 1 : file;
+        fuchsia_logging::LogMessage(severity, file_basename, line, nullptr, nullptr).stream()
             << "[" << module_name << "] " << formattedMsg;
     }
 }
@@ -69,8 +69,8 @@
     va_end(vargs);
 }
 
-}  // namespace Logging
-}  // namespace Weave
-}  // namespace nl
+} // namespace Logging
+} // namespace Weave
+} // namespace nl
 
-#endif  // WEAVE_LOGGING_STYLE_EXTERNAL
+#endif // WEAVE_LOGGING_STYLE_EXTERNAL
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericConfigurationManagerImpl.ipp b/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericConfigurationManagerImpl.ipp
index 3b3ab7f..db8c880 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericConfigurationManagerImpl.ipp
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericConfigurationManagerImpl.ipp
@@ -1067,7 +1067,7 @@
 {
     constexpr uint16_t kInputBufSize = 80;
     static_assert(kInputBufSize > 0 && kInputBufSize % 4 == 0, "kInputBufSize must be a positive multiple of 4");
-    char inputBuf[kInputBufSize];
+    char inputBuf[kInputBufSize + 1];
     constexpr uint16_t kMaxChunkLen = BASE64_MAX_DECODED_LEN(kInputBufSize);
 
     // Hash the length of the base-64 value as 4 hex digits.
diff --git a/src/include/BUILD.gn b/src/include/BUILD.gn
index 36c9fc1..9e05ebd 100644
--- a/src/include/BUILD.gn
+++ b/src/include/BUILD.gn
@@ -789,7 +789,6 @@
     "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_hlcpp",
     "//sdk/fidl/fuchsia.net.interfaces.admin:fuchsia.net.interfaces.admin_hlcpp",
     "//sdk/fidl/fuchsia.net.tun:fuchsia.net.tun_hlcpp",
-    "//sdk/fidl/fuchsia.netstack:fuchsia.netstack_hlcpp",
     "//sdk/lib/sys/cpp",
     "//third_party/boringssl",
     "//third_party/micro-ecc",
diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn
index 82466fa..e44dc24 100644
--- a/src/inet/BUILD.gn
+++ b/src/inet/BUILD.gn
@@ -47,7 +47,6 @@
     "//sdk/fidl/fuchsia.net.interfaces.admin:fuchsia.net.interfaces.admin_hlcpp",
     "//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack_hlcpp",
     "//sdk/fidl/fuchsia.net.tun:fuchsia.net.tun_hlcpp",
-    "//sdk/fidl/fuchsia.netstack:fuchsia.netstack_hlcpp",
     "//sdk/lib/sys/cpp",
     "//third_party/openweave-core/src/include:common",
     "//zircon/system/ulib/zx",
diff --git a/src/inet/TunEndPoint.cpp b/src/inet/TunEndPoint.cpp
index 8ab9525..370fe11 100644
--- a/src/inet/TunEndPoint.cpp
+++ b/src/inet/TunEndPoint.cpp
@@ -39,10 +39,6 @@
 
 #include "arpa-inet-compatibility.h"
 
-#if WEAVE_SYSTEM_CONFIG_USE_FUCHSIA_TUN
-#include <fuchsia/netstack/cpp/fidl.h>
-#endif
-
 namespace nl {
 namespace Inet {