From 2715821441c9355352aa4865a91872d4ca56ec0c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 25 Apr 2022 11:27:48 -0400 Subject: [PATCH] Fix compilation --- src/app/AttributePathExpandIterator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index 5abdb6c84737e8..b09cd85b79adbd 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -131,7 +131,9 @@ void AttributePathExpandIterator::PrepareAttributeIndexRange(const AttributePath { if (GlobalAttributesNotInMetadata[idx] == aAttributePath.mAttributeId) { - mGlobalAttributeIndex = idx; + // generally safe: we have a static cast check for GlobalAttributesNotInMetaData size + VerifyOrDie(idx <= UINT8_MAX); + mGlobalAttributeIndex = static_cast(idx); break; } }