diff options
author | Mikael Olsson <mikael.olsson@arm.com> | 2024-05-21 09:39:47 +0200 |
---|---|---|
committer | Mikael Olsson <mikael.olsson@arm.com> | 2024-05-21 09:55:43 +0200 |
commit | b96537fe38862a6fb86c093bd0f8e583bc92bf0c (patch) | |
tree | ce59062b19640ac9c88e6c96e4afec01aaa56245 /applications | |
parent | 8c940861337acdf81d07f9b12761bcef6655503f (diff) | |
download | ethos-u-core-platform-main.tar.gz |
The block_idx_end variable is left uninitialized and contains an
undeterminate value. This can cause issues later when it is compared to
block_idx because the comparison may not have the desired outcome.
To resolve this, the block_idx_end variable is now zero initialized.
Change-Id: I0767eeb4dc18ea668e6f14a386b67e4ddb9c654a
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Diffstat (limited to 'applications')
-rw-r--r-- | applications/trustzone_inference/secure/main_secure.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/applications/trustzone_inference/secure/main_secure.cpp b/applications/trustzone_inference/secure/main_secure.cpp index 1e0ea58..c070020 100644 --- a/applications/trustzone_inference/secure/main_secure.cpp +++ b/applications/trustzone_inference/secure/main_secure.cpp @@ -1,6 +1,5 @@ /* - * Copyright (c) 2021-2022 Arm Limited. All rights reserved. - * + * SPDX-FileCopyrightText: Copyright 2021-2022, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com> * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may @@ -224,7 +223,7 @@ void setup_xtgu_ns(uint32_t xtgu_base, uint32_t xtcm_start, uint32_t xtcm_size) uint32_t xtcm_end = xtcm_start + xtcm_size - 1; uint32_t xtcm_address = xtcm_start; uint32_t block_idx_start = (xtcm_address / BLKSZ) / 32; - uint32_t block_idx_end; + uint32_t block_idx_end = 0; while (xtcm_address < xtcm_end) { uint32_t block_nbr = xtcm_address / BLKSZ; |