Comment 2 for bug 229000

Revision history for this message
Agostino Russo (ago) wrote :

This should be the correct patch (down to the smallest possible delta), I can only test for regressions though, since I am not sure how to reproduce the bug myself.

diff -u ntfs-3g-1.2216/debian/changelog ntfs-3g-1.2216/debian/changelog
--- ntfs-3g-1.2216/debian/changelog
+++ ntfs-3g-1.2216/debian/changelog
@@ -1,3 +1,10 @@
+ntfs-3g (1:1.2216-1ubuntu2) hardy; urgency=low
+
+ * Backported fix in 1.2506 that addresses random file corruptions (LP:
+ #229000)
+
+ -- Agostino Russo <email address hidden> Wed, 28 May 2008 21:19:15 +0100
+
 ntfs-3g (1:1.2216-1ubuntu1) hardy; urgency=low

   * New upstream bug fix release. (LP: #199161)
only in patch2:
unchanged:
--- ntfs-3g-1.2216.orig/libntfs-3g/lcnalloc.c
+++ ntfs-3g-1.2216/libntfs-3g/lcnalloc.c
@@ -278,7 +278,7 @@
   bmp_pos &= ~7;
   writeback = 0;

- while (1) {
+ while (lcn < buf_size) {
    byte = buf + (lcn >> 3);
    bit = 1 << (lcn & 7);
    if (has_guess) {