[brasero] Libburnia plugin: Fix while loop in `brasero_libisofs_write_image_to_fd_thread()` (#685983)



commit 253031b69c5dcbcf079c445ec530afb7ccd9ea82
Author: Paul Menzel <paulepanter users sourceforge net>
Date:   Thu Oct 11 14:40:06 2012 +0200

    Libburnia plugin: Fix while loop in `brasero_libisofs_write_image_to_fd_thread()` (#685983)
    
    In commit 1b8397ee [1]
    
            commit 1b8397ee252df2d554682ca2d694d5937fbf6e39
            Author: Philippe Rouquier <bonfire-app wanadoo fr>
            Date:   Tue Oct 5 10:10:17 2010 +0200
    
                Fix for #630651 [2] - Basero creating incomplete image (.ISO) files
    
    distributed since Brasero 2.91.1
    
            $ git tag --contains 1b8397ee252df2d554682ca2d694d5937fbf6e39 | sort | head -n 1
            BRASERO_2_91_1
    
    a small bug was introduced by forgetting to substitude a command with a newly introduced variable in the loop condition. This broke the loop reading out the data to be written to the disc.
    
    This small error had a huge impacted as writing images on the fly always failed, because only half of the image was written to the disc. Several bug reports exist for this problem and are most likely due to this problem [3][4][5].
    
    Substituting this command with the variable fixes the problem reported in GNOME Bugzilla bug 685983 [6].
    
    Creating this patch would not have been possible without the invaluable and quick observations and explanations of Thomas Schmitt from the libburnia project [7]. In the end Michael Biebl from the Debian project stepped up to look into this problem and bisected this problem to the above commit. Thomas Schmitt pointed out the error afterward. A big thanks to both of them and everybody else reporting errors and providing logs!
    
    [1] http://git.gnome.org/browse/brasero/commit/?id=1b8397ee252df2d554682ca2d694d5937fbf6e39
    [2] https://bugzilla.gnome.org/show_bug.cgi?id=630651
    [3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688229
    [4] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594753
    [5] https://bugs.launchpad.net/ubuntu/+source/brasero/+bug/780117
    [6] https://bugzilla.gnome.org/show_bug.cgi?id=685983
    [7] http://libburnia-project.org/
    
    Signed-off-by: Colin Walters <walters verbum org>

 plugins/libburnia/burn-libisofs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/libburnia/burn-libisofs.c b/plugins/libburnia/burn-libisofs.c
index 22cb75e..841468a 100644
--- a/plugins/libburnia/burn-libisofs.c
+++ b/plugins/libburnia/burn-libisofs.c
@@ -199,7 +199,7 @@ brasero_libisofs_write_image_to_fd_thread (BraseroLibisofs *self)
 
 	BRASERO_JOB_LOG (self, "Writing to pipe");
 	read_bytes = priv->libburn_src->read_xt (priv->libburn_src, buf, sector_size);
-	while (priv->libburn_src->read_xt (priv->libburn_src, buf, sector_size) == sector_size) {
+	while (read_bytes == sector_size) {
 		if (priv->cancel)
 			break;
 



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