Skip to content

Commit

Permalink
Fix MD5 auth calculation on many 64-bit systems.
Browse files Browse the repository at this point in the history
Unsigned long is very often 8 bytes, not 4. Use stdint.h if available.
  • Loading branch information
wdoekes committed Mar 13, 2017
1 parent c162ebf commit a43f138
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions md5global.h
Expand Up @@ -15,11 +15,13 @@ The following makes PROTOTYPES default to 0 if it has not already
/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;

/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;

#ifdef HAVE_STDINT_H
# include <stdint.h>
typedef uint32_t UINT4;
#else
/* UINT4 defines a four byte word */
typedef unsigned long int UINT4;
#endif

/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
Expand Down

0 comments on commit a43f138

Please sign in to comment.