mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 04:24:19 +00:00
fix(lib/psa): fix Null pointer dereference error
Fixing possible Null pointer dereference error, found by Coverity scan. Change-Id: If60b7f7e13ecbc3c01e3a9c5005c480260bbabdd Signed-off-by: David Vincze <david.vincze@arm.com>
This commit is contained in:
parent
453abc80b2
commit
c32ab75c41
1 changed files with 9 additions and 9 deletions
|
@ -16,12 +16,11 @@
|
||||||
|
|
||||||
static void print_byte_array(const uint8_t *array, size_t len)
|
static void print_byte_array(const uint8_t *array, size_t len)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
size_t i;
|
||||||
|
|
||||||
if (array == NULL || len == 0U) {
|
if (array == NULL || len == 0U) {
|
||||||
(void)printf("\n");
|
(void)printf("\n");
|
||||||
}
|
} else {
|
||||||
|
|
||||||
for (i = 0U; i < len; ++i) {
|
for (i = 0U; i < len; ++i) {
|
||||||
(void)printf(" %02x", array[i]);
|
(void)printf(" %02x", array[i]);
|
||||||
if ((i & U(0xF)) == U(0xF)) {
|
if ((i & U(0xF)) == U(0xF)) {
|
||||||
|
@ -31,6 +30,7 @@ static void print_byte_array(const uint8_t *array, size_t len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void log_measurement(uint8_t index,
|
static void log_measurement(uint8_t index,
|
||||||
|
|
Loading…
Add table
Reference in a new issue