Fix uninitialised read in OperationDetail::set_status()
Setting the status and controlling the timing of operation details initialised with OperationDetail(desc, status, font) uses a conditional branch depending on the uninitialised variable this->status. valgrind: ==28957== Conditional jump or move depends on uninitialised value(s) ==28957== at 0x80E4287: GParted::OperationDetail::set_status(GParted::OperationDetailStatus) (OperationDetail.cc:77) OperationalDetail.cc: 75 void OperationDetail::set_status( OperationDetailStatus status ) 76 { >> 77 if ( this ->status != STATUS_ERROR ) 78 { 79 switch ( status ) 80 {
This commit is contained in:
parent
7477ba3c1d
commit
377d26f0cc
|
@ -32,6 +32,7 @@ OperationDetail::OperationDetail()
|
|||
|
||||
OperationDetail::OperationDetail( const Glib::ustring & description, OperationDetailStatus status, Font font )
|
||||
{
|
||||
this ->status = STATUS_NONE; // prevent uninitialized member access
|
||||
set_description( description, font ) ;
|
||||
set_status( status ) ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue