From citylink.dinoex.sub.org!admin@net2.dinoex.sub.org  Mon Jun  9 12:16:36 1997
Received: from mail.Contrib.Com (mail.Contrib.Com [194.77.12.8])
          by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA09143
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 9 Jun 1997 12:16:24 -0700 (PDT)
Received: from net2.dinoex.sub.org (net2.dinoex.sub.de [193.203.172.193])
          by mail.Contrib.Com (8.8.4/8.8.4) with SMTP
	  id VAA00930 for <freebsd.org!FreeBSD-gnats-submit>; Mon, 9 Jun 1997 21:15:58 +0200 (MET DST)
Received: from citylink.dinoex.sub.org by net2.dinoex.sub.org with UUCP
	(Smail3.1.29.1 #1) id m0wb9yn-000DzoC; Mon, 9 Jun 97 21:19 CEST
Received: (from admin@localhost) by citylink.dinoex.sub.org (8.8.5/PMuch-B3b)
	id XAA27007; Sun, 8 Jun 1997 23:10:15 +0200 (CEST)
Message-Id: <199706082110.XAA27007@citylink.dinoex.sub.org>
Date: Sun, 8 Jun 1997 23:10:15 +0200 (CEST)
From: admin@citylink.dinoex.sub.org (Maschinenwart)
Reply-To: admin@citylink.dinoex.sub.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: dd conv=sync makes garbage
X-Send-Pr-Version: 3.2

>Number:         3818
>Category:       bin
>Synopsis:       "dd conv=sync" makes garbage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun  9 12:20:01 PDT 1997
>Closed-Date:    Tue Aug 19 12:46:32 PDT 1997
>Last-Modified:  Tue Aug 19 12:47:56 PDT 1997
>Originator:     Peter Much
>Release:        FreeBSD 2.2.1-RELEASE i386
>Organization:
Beyond the Future Shockwave: Convenience or Conviviality?
>Environment:

nondecident.

>Description:

manpage for dd says:
        sync    Pad every input block to the input buffer size.  Spaces
                are used for pad bytes if a block oriented conversion
                value is specified, otherwise NUL bytes are used.

but experience shows:
Not only NUL bytes are used. Often garbage is used, f.i. if bs lessthan 8k.

>How-To-Repeat:

$ echo test | dd conv=sync | hexdump

>Fix:
	
using osync. But osync is broken in another way:

$ echo test | dd conv=osync | dd conv=osync | dd conv=osync | wc
0+1 records in
1+0 records out
512 bytes transferred in 0.001118 secs (457983 bytes/sec)
1+0 records in
2+0 records out
1024 bytes transferred in 0.001328 secs (771089 bytes/sec)
2+0 records in
3+0 records out
1536 bytes transferred in 0.068431 secs (22446 bytes/sec)
       1       2    1536

regards,
PM
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jlemon 
State-Changed-When: Tue Aug 19 12:46:32 PDT 1997 
State-Changed-Why:  

Fixed in dd.c, rev 1.11 
>Unformatted:
