From 642d09f28fffaa07ae9c6cf5ca8d790bc54dca32 Mon Sep 17 00:00:00 2001 From: Gregory Comer Date: Wed, 5 Feb 2025 02:00:07 -0800 Subject: [PATCH] Increase string buffer size for tensor size errors Summary: When improving the tensor resize error messages (D67665846), I accidentally left the string buffer size smaller than intended. This is not a memory safety issue, it just leads to the error messages being truncated. This change increases the buffer size back to the intended length. Differential Revision: D69170272 --- runtime/core/portable_type/tensor_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/core/portable_type/tensor_impl.cpp b/runtime/core/portable_type/tensor_impl.cpp index f0297778744..307210a465e 100644 --- a/runtime/core/portable_type/tensor_impl.cpp +++ b/runtime/core/portable_type/tensor_impl.cpp @@ -95,7 +95,7 @@ Error TensorImpl::internal_resize_contiguous(ArrayRef new_sizes) { case TensorShapeDynamism::STATIC: if (!std::equal(sizes_, sizes_ + dim_, new_sizes.begin())) { #ifdef ET_LOG_ENABLED - std::array old_sizes_str, new_sizes_str; + std::array old_sizes_str, new_sizes_str; executorch::runtime::sizes_to_string( old_sizes_str.data(),