fixed potential crasher in read algorithm (#347914)
* src/xfs.cc: fixed potential crasher in read algorithm (#347914)
This commit is contained in:
parent
d37f1154d7
commit
cf49d07996
|
@ -1,3 +1,7 @@
|
|||
2006-07-19 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||
|
||||
* src/xfs.cc: fixed potential crasher in read algorithm (#347914)
|
||||
|
||||
2006-07-18 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||
|
||||
* include/GParted_Core.h,
|
||||
|
|
|
@ -80,8 +80,9 @@ void xfs::Set_Used_Sectors( Partition & partition )
|
|||
S = -1 ;
|
||||
|
||||
//free blocks
|
||||
output = output .substr( output .find( "fdblocks" ) ) ;
|
||||
if ( sscanf( output .c_str(), "fdblocks = %Ld", &N ) != 1 )
|
||||
index = output .find( "fdblocks" ) ;
|
||||
if ( index > output .length() ||
|
||||
sscanf( output .substr( index ) .c_str(), "fdblocks = %Ld", &N ) != 1 )
|
||||
N = -1 ;
|
||||
|
||||
if ( N > -1 && S > -1 )
|
||||
|
|
Loading…
Reference in New Issue