From a3a0ce0bb4e664d967346f7cd6b121c57f9755fd Mon Sep 17 00:00:00 2001 From: Jacob Khaliqi Date: Tue, 14 Jan 2025 12:46:42 -0800 Subject: [PATCH] [GLUTEN-8534][VL] Fix allowing loops to iterate beyond end of array --- cpp/velox/operators/serializer/VeloxRowToColumnarConverter.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/velox/operators/serializer/VeloxRowToColumnarConverter.cc b/cpp/velox/operators/serializer/VeloxRowToColumnarConverter.cc index 1ec043e66035..67616190ffbb 100644 --- a/cpp/velox/operators/serializer/VeloxRowToColumnarConverter.cc +++ b/cpp/velox/operators/serializer/VeloxRowToColumnarConverter.cc @@ -108,6 +108,7 @@ VectorPtr createFlatVector( uint8_t bytesValue[length]; memcpy(bytesValue, memoryAddress + offsets[pos] + wordoffset, length); uint8_t bytesValue2[16]{}; + GLUTEN_CHECK(length <= 16, "array out of bounds exception"); for (int k = length - 1; k >= 0; k--) { bytesValue2[length - 1 - k] = bytesValue[k]; }