8296957: One more cast in SAFE_SIZE_NEW_ARRAY2

Backport-of: fb6c992f325981c42c7f75109a6c9db7ca8715d8
This commit is contained in:
Sergey Bylokhov 2022-12-01 09:28:30 +00:00
parent ea36dfe89d
commit 7750a23f1b

View File

@ -91,7 +91,7 @@
(IS_SAFE_SIZE_MUL(sizeof(type), (n)) ? (new type[(size_t)(n)]) : throw std::bad_alloc())
#define SAFE_SIZE_NEW_ARRAY2(type, n, m) \
(IS_SAFE_SIZE_MUL((m), (n)) && IS_SAFE_SIZE_MUL(sizeof(type), (n) * (m)) ? \
(IS_SAFE_SIZE_MUL((m), (n)) && IS_SAFE_SIZE_MUL(sizeof(type), (size_t)(n) * (size_t)(m)) ? \
(new type[(size_t)(n) * (size_t)(m)]) : throw std::bad_alloc())
/*