From owner-freebsd-bugs Sun Jun 24 11:30: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6C29737B407 for ; Sun, 24 Jun 2001 11:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5OIU1l56189; Sun, 24 Jun 2001 11:30:01 -0700 (PDT) (envelope-from gnats) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.49.166]) by hub.freebsd.org (Postfix) with ESMTP id F167337B401 for ; Sun, 24 Jun 2001 11:22:23 -0700 (PDT) (envelope-from stephen@cauchy.math.missouri.edu) Received: (from stephen@localhost) by cauchy.math.missouri.edu (8.11.4/8.11.4) id f5OIMNe98173; Sun, 24 Jun 2001 13:22:23 -0500 (CDT) (envelope-from stephen) Message-Id: <200106241822.f5OIMNe98173@cauchy.math.missouri.edu> Date: Sun, 24 Jun 2001 13:22:23 -0500 (CDT) From: Stephen Montgomery-Smith Reply-To: Stephen Montgomery-Smith To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/28386: md5 -p produces 2 lines of numbers Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 28386 >Category: bin >Synopsis: md5 -p produces 2 lines of numbers >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jun 24 11:30:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Stephen Montgomery-Smith >Release: FreeBSD 4.3-STABLE i386 >Organization: University of Missouri >Environment: System: FreeBSD cauchy 4.3-STABLE FreeBSD 4.3-STABLE #0: Tue Jun 12 09:38:34 CDT 2001 stephen@cauchy:/usr/obj/usr/src/sys/cauchy i386 >Description: md5 -p produces two numbers rather than one number at the end of the output. >How-To-Repeat: md5 -p < any_file >Fix: Valentin Nechayev came up with this (posting to freebsd-stable and freebsd-current). Since this is copied using cut and paste from my mail client probably the tabs got messed up, but it is really easy to apply by hand. A fix: --- md5.c.orig Mon Jun 4 00:38:02 2001 +++ md5.c Sun Jun 24 19:37:13 2001 @@ -65,7 +65,7 @@ switch (ch) { case 'p': MDFilter(1); - break; + exit(0); case 'q': qflag = 1; break; This avoids determination of other options, but this does not conflict directly with man page. Moreover such exit(0) should be applied not only with -p, but also with -x, -t and -s: all these options should not gather any input files. Patch is trivial. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message