Fix another issue spotted by PVS-Studio

This commit is contained in:
Nikolaj Schlej 2022-09-10 14:32:10 +02:00
parent 22d1db8c7f
commit a9c6f347a2
2 changed files with 2 additions and 2 deletions

View File

@ -317,7 +317,7 @@ char * r;
if (b == NULL || b->slen < 0 || b->data == NULL) return NULL; if (b == NULL || b->slen < 0 || b->data == NULL) return NULL;
l = b->slen; l = b->slen;
r = (char *) bstr__alloc ((size_t) (l + 1)); r = (char *) bstr__alloc ((size_t)l + 1);
if (r == NULL) return r; if (r == NULL) return r;
for (i=0; i < l; i ++) { for (i=0; i < l; i ++) {

View File

@ -4513,7 +4513,7 @@ make_partition_table_consistent:
info += UString("\nHash: ") + UString(hash.toHex().constData()); info += UString("\nHash: ") + UString(hash.toHex().constData());
UModelIndex codeIndex = model->addItem(localOffset + partitions[i].ptEntry.Offset.Offset, Types::CpdPartition, Subtypes::CodeCpdPartition, name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, parent); UModelIndex codeIndex = model->addItem(localOffset + partitions[i].ptEntry.Offset.Offset, Types::CpdPartition, Subtypes::CodeCpdPartition, name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, parent);
parseRawArea(codeIndex); (void)parseRawArea(codeIndex);
} }
} }
else if (partitions[i].type == Types::Padding) { else if (partitions[i].type == Types::Padding) {