Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Sep 1996 12:08:13 -0700 (PDT)
From:      Jason Thorpe <thorpej@nas.nasa.gov>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/1649: md5(1) header file makes bad assumption
Message-ID:  <199609191908.MAA11449@nostromo.nas.nasa.gov>
Resent-Message-ID: <199609191920.MAA29319@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1649
>Category:       bin
>Synopsis:       md5(1) header file makes bad assumption
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 19 12:20:01 PDT 1996
>Last-Modified:
>Originator:     Jason Thorpe
>Organization:
Numerical Aerodynamic Simulation Project - NASA Ames
>Release:        FreeBSD-current 960918, built on NetBSD/alpha
>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
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609191908.MAA11449>