mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-26 16:18:31 +00:00
Use the correct value in the call to swab(3) with conv=swab. Previously,
dd if=/dev/zero of=/dev=null obs=23520 conv=swab coredumped. Please somebody review it, i'm not 105 % sure i'm understanding all this mess correctly. Detected by: Holm Tiffe <holm@geophysik.tu-freiberg.de>
This commit is contained in:
parent
9cf25fbec7
commit
a28ea077f9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32324
@ -1,7 +1,8 @@
|
|||||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||||
# $Id$
|
# $Id: Makefile,v 1.4 1997/02/22 14:02:39 peter Exp $
|
||||||
|
|
||||||
PROG= dd
|
PROG= dd
|
||||||
SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c
|
SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c
|
||||||
|
CFLAGS+=-g
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: dd.c,v 1.11 1997/08/19 19:46:18 jlemon Exp $
|
* $Id: dd.c,v 1.12 1997/10/11 20:09:05 joerg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -316,7 +316,7 @@ dd_in()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ddflags & C_SWAB) {
|
if (ddflags & C_SWAB) {
|
||||||
if ((n = in.dbcnt) & 1) {
|
if ((n = in.dbrcnt) & 1) {
|
||||||
++st.swab;
|
++st.swab;
|
||||||
--n;
|
--n;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user