Bug 27524

Summary: md5 -q does nothing
Product: Base System Reporter: Archie Cobbs <archie>
Component: binAssignee: ru <ru>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-RELEASE   
Hardware: Any   
OS: Any   

Description Archie Cobbs 2001-05-22 01:30:01 UTC
	Running "md5 -q" does nothing. What it should do (I think)
	is read from standard input and print the md5 checksum.

Fix: 

The logic in mc5.c is broken:

        if (argc > 1) {
                while ((ch = getopt(argc, argv, "ps:qrtx")) != -1) {
                        switch (ch) {
		....
	} else
		...

	Flags should be subtracted from "argc" before the test
	"if (argc > 1) {" is performed.
How-To-Repeat: 
	$ /sbin/md5 -q
	$
Comment 1 ru freebsd_committer freebsd_triage 2001-05-22 11:33:59 UTC
State Changed
From-To: open->analyzed

Fixed in 5.0-CURRENT.
Comment 2 ru freebsd_committer freebsd_triage 2001-05-22 11:34:34 UTC
Responsible Changed
From-To: freebsd-bugs->ru

Mine.
Comment 3 ru freebsd_committer freebsd_triage 2001-05-26 13:08:49 UTC
State Changed
From-To: analyzed->closed

Fixed in 4.3-STABLE.