mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +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,18 +16,18 @@
|
|||
|
||||
static void print_byte_array(const uint8_t *array, size_t len)
|
||||
{
|
||||
unsigned int i;
|
||||
size_t i;
|
||||
|
||||
if (array == NULL || len == 0U) {
|
||||
(void)printf("\n");
|
||||
}
|
||||
|
||||
for (i = 0U; i < len; ++i) {
|
||||
(void)printf(" %02x", array[i]);
|
||||
if ((i & U(0xF)) == U(0xF)) {
|
||||
(void)printf("\n");
|
||||
if (i < (len - 1U)) {
|
||||
INFO("\t\t:");
|
||||
} else {
|
||||
for (i = 0U; i < len; ++i) {
|
||||
(void)printf(" %02x", array[i]);
|
||||
if ((i & U(0xF)) == U(0xF)) {
|
||||
(void)printf("\n");
|
||||
if (i < (len - 1U)) {
|
||||
INFO("\t\t:");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue