From thorpej@nas.nasa.gov  Thu Sep 19 12:14:22 1996
Received: from nostromo.nas.nasa.gov (nostromo.nas.nasa.gov [129.99.223.15])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA26223
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 19 Sep 1996 12:14:21 -0700 (PDT)
Received: (from thorpej@localhost) by nostromo.nas.nasa.gov (8.7.5/8.6.9-rAT) id MAA11449; Thu, 19 Sep 1996 12:08:13 -0700 (PDT)
Message-Id: <199609191908.MAA11449@nostromo.nas.nasa.gov>
Date: Thu, 19 Sep 1996 12:08:13 -0700 (PDT)
From: Jason Thorpe <thorpej@nas.nasa.gov>
Reply-To: thorpej@nas.nasa.gov
To: FreeBSD-gnats-submit@freebsd.org
Subject: md5(1) header file makes bad assumption
X-Send-Pr-Version: 3.95

>Number:         1649
>Category:       bin
>Synopsis:       md5(1) header file makes bad assumption
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 19 12:20:01 PDT 1996
>Closed-Date:    Thu Sep 18 11:19:54 PDT 1997
>Last-Modified:  Thu Sep 18 11:20:16 PDT 1997
>Originator:     Jason Thorpe
>Release:        FreeBSD-current 960918, built on NetBSD/alpha
>Organization:
Numerical Aerodynamic Simulation Project - NASA Ames
>Environment:
	
System: NetBSD nostromo 1.2A NetBSD 1.2A (NOSY) #14: Wed Sep 18 14:54:10 PDT 1996 thorpej@nostromo:/work/clean-current/src/sys/arch/alpha/compile/NOSY alpha


>Description:
	The md5(1) program makes a bad assumption in its "global.h"
	header file.  None of the bogus defintions are used, but the
	assumption is bad to make, anyhow, and encourages bad programming
	practice.

>How-To-Repeat:
	While building md5(1) under NetBSD/alpha, inspect global.h.
	See the bad assumption and think to yourself "Gee, that ought
	to be fixed."

>Fix:
	Patch below... This isn't critical (as noted above in the'
	category), but would be nice to see nontheless.

 ----- snip -----
Index: global.h
===================================================================
RCS file: /mastersrc/netbsd/src/usr.bin/md5/global.h,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -c -r1.1.1.1 -r1.3
*** global.h	1996/09/19 07:14:24	1.1.1.1
--- global.h	1996/09/19 18:59:52	1.3
***************
*** 13,23 ****
--- 13,33 ----
  /* POINTER defines a generic pointer type */
  typedef unsigned char *POINTER;
  
+ #if 0
  /* UINT2 defines a two byte word */
  typedef unsigned short int UINT2;
  
  /* UINT4 defines a four byte word */
  typedef unsigned long int UINT4;
+ #else
+ #include <sys/types.h>
+ 
+ /* UINT2 defines a two byte word */
+ typedef u_int16_t UINT2;
+ 
+ /* UINT4 defines a four byte word */
+ typedef u_int32_t UINT4;
+ #endif /* 0 */
  
  /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
  If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
>Release-Note:
>Audit-Trail:

From: Poul-Henning Kamp <phk@critter.tfs.com>
To: thorpej@nas.nasa.gov
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/1649: md5(1) header file makes bad assumption 
Date: Thu, 19 Sep 1996 21:59:59 +0200

 Got it, thanks!
 
 Poul-Henning
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Thu Sep 18 11:19:54 PDT 1997 
State-Changed-Why:  

... and now it's committed too :-) 
>Unformatted:
