Navigation Menu

Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
8296957: One more cast in SAFE_SIZE_NEW_ARRAY2
Browse files Browse the repository at this point in the history
Backport-of: fb6c992f325981c42c7f75109a6c9db7ca8715d8
  • Loading branch information
mrserb committed Nov 24, 2022
1 parent 793c16c commit 6615c05
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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())

/*
Expand Down

1 comment on commit 6615c05

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.