bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils-5.92 - dd skip option completely broken


From: Paul Eggert
Subject: Re: coreutils-5.92 - dd skip option completely broken
Date: Mon, 31 Oct 2005 00:43:28 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

That's an embarrassing bug!  Thanks for reporting it.  I installed
this patch into CVS coreutils (main branch).

We should add a test case but I'm not offhand sure which file it
should go into.  Jim, advice?

2005-10-31  Paul Eggert  <address@hidden>

        * src/dd.c (skip): Fix off-by-one error reported by
        Theodoros V. Kalamatianos.

--- src/dd.c    30 Sep 2005 05:07:11 -0000      1.188
+++ src/dd.c    31 Oct 2005 08:39:14 -0000      1.189
@@ -1167,7 +1167,7 @@ skip (int fdesc, char const *file, uintm
          if (fdesc == STDIN_FILENO)
            advance_input_offset (nread);
        }
-      while (records-- != 0);
+      while (--records != 0);
 
       return records;
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]