[gparted] Fix crash moving partitions when size is a multiple of 16 MiB (#623697)



commit e810b7f7f099a69a671be58ab7cd75475d55b57e
Author: Curtis Gedak <gedakc gmail com>
Date:   Tue Jul 6 13:11:50 2010 -0600

    Fix crash moving partitions when size is a multiple of 16 MiB (#623697)

 src/GParted_Core.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 1097250..966900a 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2339,7 +2339,7 @@ bool GParted_Core::copy_filesystem( const Glib::ustring & src_device,
 				Utils::format_size( optimal_blocksize, 1 ) ),
 				STATUS_NONE ) ) ;
 
-	if ( succes )
+	if ( succes && llabs( done ) < src_length )
 		succes = copy_blocks( src_device, 
 				    dst_device,
 				    src_start + ( dst_start > src_start ? 0 : (done / src_sector_size) ),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]