mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 08:58:22 -04:00
[partition] Avoid UB by initializing size everywhere
This commit is contained in:
parent
bffaf47900
commit
fd4bc4bb17
1 changed files with 2 additions and 1 deletions
|
@ -150,7 +150,7 @@ PartitionLayout::execute( Device *dev, qint64 firstSector,
|
|||
const PartitionRole& role )
|
||||
{
|
||||
QList< Partition* > partList;
|
||||
qint64 size, minSize, maxSize, end;
|
||||
qint64 minSize, maxSize, end;
|
||||
qint64 totalSize = lastSector - firstSector + 1;
|
||||
qint64 availableSize = totalSize;
|
||||
|
||||
|
@ -161,6 +161,7 @@ PartitionLayout::execute( Device *dev, qint64 firstSector,
|
|||
{
|
||||
Partition *currentPartition = nullptr;
|
||||
|
||||
qint64 size = -1;
|
||||
// Calculate partition size
|
||||
if ( part.partSize.isValid() )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue