Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8296957: One more cast in SAFE_SIZE_NEW_ARRAY2
Backport-of: fb6c992f325981c42c7f75109a6c9db7ca8715d8
  • Loading branch information
mrserb committed Dec 6, 2022
1 parent 2ad48cb commit 3f44b9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jdk/src/share/native/common/sizecalc.h
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 3f44b9b

@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.