diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
index 033f22ab2ac38..a72811e08146b 100644
--- a/sandbox/linux/services/credentials.cc
+++ b/sandbox/linux/services/credentials.cc
@@ -3,10 +3,10 @@
 // found in the LICENSE file.
 
 
-#ifdef UNSAFE_BUFFERS_BUILD
-// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
-#pragma allow_unsafe_buffers
-#endif
+#include "base/containers/auto_spanification_helper.h"
+#include "base/containers/span.h"
+
+
 
 #include "sandbox/linux/services/credentials.h"
 
@@ -87,12 +87,14 @@ bool ChrootToSafeEmptyDir() {
   // PID namespace). With a process, we can just use /proc/self.
   pid_t pid = -1;
 
-  alignas(16) char stack_buf[PTHREAD_STACK_MIN_CONST];
+  alignas(16) std::array<char, PTHREAD_STACK_MIN_CONST> stack_buf;
 
 #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
     defined(ARCH_CPU_MIPS_FAMILY)
   // The stack grows downward.
-  void* stack = stack_buf + sizeof(stack_buf);
+  // SAFETY: The stack buffer is a std::array with a known size, so this
+  // pointer arithmetic is safe.
+  void* stack = UNSAFE_BUFFERS(stack_buf.data() + stack_buf.size());
 #else
 #error "Unsupported architecture"
 #endif
diff --git a/third_party/blink/renderer/platform/transforms/transform_operations_test.cc b/third_party/blink/renderer/platform/transforms/transform_operations_test.cc
index 498ae46fc97d6..4c74415853ce6 100644
--- a/third_party/blink/renderer/platform/transforms/transform_operations_test.cc
+++ b/third_party/blink/renderer/platform/transforms/transform_operations_test.cc
@@ -114,9 +114,11 @@ TEST(TransformOperationsTest, AbsoluteAnimatedTranslatedBoundsTest) {
 }
 
 TEST(TransformOperationsTest, EmpiricalAnimatedTranslatedBoundsTest) {
-  float test_transforms[][2][3] = {{{0, 0, 0}, {10, 10, 0}},
-                                   {{-100, 202.5, -32.6}, {43.2, 56.1, 89.75}},
-                                   {{43.2, 56.1, 89.75}, {-100, 202.5, -32.6}}};
+  std::array<std::array<std::array<float, 3>, 2>, 3> test_transforms = {{
+      {{{0, 0, 0}, {10, 10, 0}}},
+      {{{-100, 202.5, -32.6}, {43.2, 56.1, 89.75}}},
+      {{{43.2, 56.1, 89.75}, {-100, 202.5, -32.6}}},
+  }};
 
   // All progressions for animations start and end at 0, 1 respectively,
   // we can go outside of these bounds, but will always at least contain
@@ -129,15 +131,15 @@ TEST(TransformOperationsTest, EmpiricalAnimatedTranslatedBoundsTest) {
       TransformOperations to_ops;
       from_ops.Operations().push_back(
           MakeGarbageCollected<TranslateTransformOperation>(
-              Length::Fixed(UNSAFE_TODO(test_transforms[i])[0][0]),
-              Length::Fixed(UNSAFE_TODO(test_transforms[i])[0][1]),
-              UNSAFE_TODO(test_transforms[i])[0][2],
+              Length::Fixed(test_transforms[i][0][0]),
+              Length::Fixed(test_transforms[i][0][1]),
+              test_transforms[i][0][2],
               TransformOperation::kTranslate3D));
       to_ops.Operations().push_back(
           MakeGarbageCollected<TranslateTransformOperation>(
-              Length::Fixed(UNSAFE_TODO(test_transforms[i])[1][0]),
-              Length::Fixed(UNSAFE_TODO(test_transforms[i])[1][1]),
-              UNSAFE_TODO(test_transforms[i])[1][2],
+              Length::Fixed(test_transforms[i][1][0]),
+              Length::Fixed(test_transforms[i][1][1]),
+              test_transforms[i][1][2],
               TransformOperation::kTranslate3D));
       EmpiricallyTestBounds(from_ops, to_ops, progress[j][0], progress[j][1]);
     }
@@ -175,10 +177,12 @@ TEST(TransformOperationsTest, AbsoluteAnimatedScaleBoundsTest) {
 }
 
 TEST(TransformOperationsTest, EmpiricalAnimatedScaleBoundsTest) {
-  float test_transforms[][2][3] = {{{1, 1, 1}, {10, 10, -32}},
-                                   {{1, 2, 5}, {-1, -2, -4}},
-                                   {{0, 0, 0}, {1, 2, 3}},
-                                   {{0, 0, 0}, {0, 0, 0}}};
+  std::array<std::array<std::array<float, 3>, 2>, 4> test_transforms = {{
+      {{{1, 1, 1}, {10, 10, -32}}},
+      {{{1, 2, 5}, {-1, -2, -4}}},
+      {{{0, 0, 0}, {1, 2, 3}}},
+      {{{0, 0, 0}, {0, 0, 0}}},
+  }};
 
   // All progressions for animations start and end at 0, 1 respectively,
   // we can go outside of these bounds, but will always at least contain
@@ -191,15 +195,15 @@ TEST(TransformOperationsTest, EmpiricalAnimatedScaleBoundsTest) {
       TransformOperations to_ops;
       from_ops.Operations().push_back(
           MakeGarbageCollected<TranslateTransformOperation>(
-              Length::Fixed(UNSAFE_TODO(test_transforms[i])[0][0]),
-              Length::Fixed(UNSAFE_TODO(test_transforms[i])[0][1]),
-              UNSAFE_TODO(test_transforms[i])[0][2],
+              Length::Fixed(test_transforms[i][0][0]),
+              Length::Fixed(test_transforms[i][0][1]),
+              test_transforms[i][0][2],
               TransformOperation::kTranslate3D));
       to_ops.Operations().push_back(
           MakeGarbageCollected<TranslateTransformOperation>(
-              Length::Fixed(UNSAFE_TODO(test_transforms[i])[1][0]),
-              Length::Fixed(UNSAFE_TODO(test_transforms[i])[1][1]),
-              UNSAFE_TODO(test_transforms[i])[1][2],
+              Length::Fixed(test_transforms[i][1][0]),
+              Length::Fixed(test_transforms[i][1][1]),
+              test_transforms[i][1][2],
               TransformOperation::kTranslate3D));
       EmpiricallyTestBounds(from_ops, to_ops, progress[j][0], progress[j][1]);
     }
