apg (2.2.3.dfsg.1-2) 10_prelim-412618

Summary

 sha/sha.c |    3 ++-
 sha/sha.h |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

#! /bin/sh /usr/share/dpatch/dpatch-run
## 10_prelim-412618.dpatch by Marc Haber <mh+debian-packages@zugschlus.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: preliminary patch to improve password quality on 64bit arches.
## DP: submitted by Kaare Hviid (BTS #412618)

@DPATCH@
diff -urNad trunk~/sha/sha.c trunk/sha/sha.c
--- trunk~/sha/sha.c	2003-08-07 17:40:30.000000000 +0200
+++ trunk/sha/sha.c	2007-06-20 17:06:33.000000000 +0200
@@ -13,6 +13,7 @@
 */
 
 #include <string.h>
+#include <sys/types.h>
 #include "sha.h"
 
 /* The SHA f()-functions */
@@ -39,7 +40,7 @@
 
 /* 32-bit rotate - kludged with shifts */
 
-typedef unsigned long UL ;	/* to save space */
+typedef u_int32_t UL ;	/* to save space */
 
 #define S(n,X)  ( ( ((UL)X) << n ) | ( ((UL)X) >> ( 32 - n ) ) )
 
diff -urNad trunk~/sha/sha.h trunk/sha/sha.h
--- trunk~/sha/sha.h	2003-08-07 17:40:30.000000000 +0200
+++ trunk/sha/sha.h	2007-06-20 17:06:49.000000000 +0200
@@ -16,7 +16,7 @@
 /* Useful defines/typedefs */
 
 typedef unsigned char   BYTE ;
-typedef unsigned long   LONG ;
+typedef u_int32_t  LONG ;
 
 /* The SHA block size and message digest sizes, in bytes */