diff options
author | seongwoo chae <mhs4670go@naver.com> | 2024-01-31 06:21:18 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2024-02-01 16:57:07 +0900 |
commit | 5b9fb1a70172d8353cd66b8c0b93edacccf69ecf (patch) | |
tree | 4570a2a900853aae0a7d3704e86610fd3e934368 | |
parent | 3612b02b0000443160b282b1e20b91488ae2533a (diff) | |
download | nnfw-accepted/tizen_unified.tar.gz nnfw-accepted/tizen_unified.tar.bz2 nnfw-accepted/tizen_unified.zip |
Prevent overflow from bit shifting (#12566)accepted/tizen/unified/x/20240205.063928accepted/tizen/unified/20240202.165957tizenchunseok/svaceaccepted/tizen_unified_xaccepted/tizen_unified
This commit prevents an overflow from bit shifting.
ONE-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
-rw-r--r-- | compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h b/compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h index 205baa626..fec08993c 100644 --- a/compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h +++ b/compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h @@ -114,7 +114,7 @@ private: const int32_t l = lowerLog2(block->size + sizeof(Block)); const int64_t address = ((uint8_t *)block - (uint8_t *)_start_block); - buddy = (Block *)((address ^ (1 << l)) + (uint8_t *)_start_block); + buddy = (Block *)((address ^ (1LL << l)) + (uint8_t *)_start_block); if (!buddy->is_free || buddy->size != block->size) return nullptr; |