Changeset 156
- Timestamp:
- Jan 13, 2008, 7:25:06 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/acconfig.h
r1 r156 342 342 /* Define if UINT64 is 32 bits. */ 343 343 #undef UINT64_IS_32 344 345 /* Define if you have uint64_t. */ 346 #undef HAVE_UINT64_T 344 347 345 348 /* Define if you have utmpx.h. */ -
trunk/aclocal.m4
r153 r156 250 250 sh_cv_typedef_foo=`echo sh_cv_typedef_$1 | sed -e 's% %_%g'` 251 251 AC_CACHE_VAL( $sh_cv_typedef_foo, 252 [AC_TRY_COMPILE([#include <stdlib.h> 253 #include <sys/types.h>], [ 252 [AC_TRY_COMPILE([ 253 #include <stdlib.h> 254 #include <sys/types.h> 255 #ifdef HAVE_STDINT_H 256 #include <stdint.h> 257 #endif 258 #ifdef HAVE_INTTYPES_H 259 #include <inttypes.h> 260 #endif], [ 254 261 #undef $1 255 262 int a = sizeof($1); -
trunk/configure.ac
r153 r156 34 34 AC_SUBST(BUILD_CC) 35 35 36 GCC_STACK_PROTECT_LIB 37 GCC_STACK_PROTECT_CC 36 if test "x$GCC" == "xyes"; then 37 GCC_STACK_PROTECT_LIB 38 GCC_STACK_PROTECT_CC 39 fi 38 40 39 41 AC_HEADER_STDC … … 399 401 AC_C_LONG_DOUBLE 400 402 SH_CHECK_TYPEDEF(long long, HAVE_LONG_LONG) 403 SH_CHECK_TYPEDEF(uint64_t, HAVE_UINT64_T) 401 404 if test "$sh_HAVE_LONG_LONG" = "yes"; then 402 405 AC_CHECK_SIZEOF(unsigned long long, 4) -
trunk/docs/Changelog
r154 r156 1 1 2.4.2: 2 * put result vector of rng in skey struct 2 3 * fix more compiler warnings, and a potential (compiler-dependent) 3 4 NULL dereference in the unix entropy collector -
trunk/include/samhain.h
r149 r156 98 98 #ifdef HAVE_INTTYPES_H 99 99 #include <inttypes.h> 100 #e lse100 #endif 101 101 #ifdef HAVE_STDINT_H 102 102 #include <stdint.h> 103 103 #endif 104 #endif 105 106 #if !defined(HAVE_INTTYPES_H) && !defined(HAVE_STDINT_H) 104 105 #if !defined(HAVE_UINT64_T) 107 106 108 107 #ifdef HAVE_LONG_LONG_64 … … 112 111 #define UINT64 unsigned long 113 112 #else 114 #define UINT64_IS_32 115 #define UINT64 unsigned long 113 #error "no 64bit type found" 116 114 #endif 117 115 #endif … … 135 133 #define SH_MOD_ACTIVE 0 136 134 #define SH_MOD_FAILED -1 137 135 138 136 /* Flags for file status 139 137 */ … … 325 323 UINT32 rng2[3]; 326 324 325 UINT32 res_vec[6]; 326 327 327 UINT32 ErrFlag[2]; 328 328 -
trunk/include/sh_unix.h
r149 r156 23 23 #define SH_UNIX_H 24 24 25 /* For PATH_MAX */ 25 26 #include <limits.h> 27 #if !defined(PATH_MAX) 28 #define PATH_MAX 1024 29 #endif 30 26 31 #include <unistd.h> 27 32 #include "samhain.h" -
trunk/include/slib.h
r149 r156 68 68 #define SL_GNUC_CONST __attribute__((const)) 69 69 #else 70 #undef S H_GNUC_CONST71 #define S H_GNUC_CONST70 #undef SL_GNUC_CONST 71 #define SL_GNUC_CONST 72 72 #endif 73 73 -
trunk/src/sh_utils.c
r149 r156 941 941 UINT32 taus_get () 942 942 { 943 UINT32 taus_svec[6]; 943 #define TAUS_SAMPLE 12 944 945 UINT32 taus_svec[TAUS_SAMPLE]; 944 946 UINT32 retval; 945 947 UINT32 * res; 946 static UINT32 res_vec[6];948 UINT32 * res_vec = &(skey->res_vec[0]); 947 949 static int res_num = 0; 948 950 register int i; … … 962 964 963 965 SH_MUTEX_LOCK_UNSAFE(mutex_skey); 964 taus_svec[0] = taus_get_long (&(skey->rng0[0]));965 taus_svec[1] = taus_get_long (&(skey->rng1[0]));966 taus_svec[2] = taus_get_long (&(skey->rng2[0]));967 taus_svec[3] = taus_get_long (&(skey->rng0[0]));968 taus_svec[4] = taus_get_long (&(skey->rng1[0]));969 taus_svec[5] = taus_get_long (&(skey->rng2[0]));966 for (i = 0; i < (TAUS_SAMPLE/3); ++i) 967 { 968 taus_svec[i*3] = taus_get_long (&(skey->rng0[0])); 969 taus_svec[i*3+1] = taus_get_long (&(skey->rng1[0])); 970 taus_svec[i*3+2] = taus_get_long (&(skey->rng2[0])); 971 } 970 972 SH_MUTEX_UNLOCK_UNSAFE(mutex_skey); 971 973 972 974 res = sh_tiger_hash_uint32 ( (char *) &taus_svec[0], 973 975 TIGER_DATA, 974 (unsigned long)( 6* sizeof(UINT32)),976 (unsigned long)(TAUS_SAMPLE * sizeof(UINT32)), 975 977 kbuf, KEY_BYT/sizeof(UINT32)); 976 978 … … 980 982 res_vec[i] = res[i]; 981 983 } 982 retval = taus_svec[0];984 retval = res[0]; 983 985 res_num = 1; 984 986 SH_MUTEX_UNLOCK_UNSAFE(mutex_skey); 985 987 986 taus_svec[0] = 0; taus_svec[1] = 0; taus_svec[2] = 0; 987 taus_svec[3] = 0; taus_svec[4] = 0; taus_svec[5] = 0; 988 memset(taus_svec, '\0', TAUS_SAMPLE * sizeof(UINT32)); 988 989 989 990 return retval;
Note:
See TracChangeset
for help on using the changeset viewer.