diff options
Diffstat (limited to 'cipher')
-rw-r--r-- | cipher/ChangeLog | 8 | ||||
-rw-r--r-- | cipher/des.c | 5 | ||||
-rw-r--r-- | cipher/rndunix.c | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index edce2b07e..328f26492 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,11 @@ +Sun Jan 3 15:28:44 CET 1999 Werner Koch <[email protected]> + + * rndunix.c (start_gatherer): Fixed stupid ==/= bug + +1998-12-31 Geoff Keating <[email protected]> + + * des.c (is_weak_key): Rewrite loop end condition. + Tue Dec 29 14:41:47 CET 1998 Werner Koch <[email protected]> * random.c: add unistd.h for getpid(). diff --git a/cipher/des.c b/cipher/des.c index f7187c0a1..41c768894 100644 --- a/cipher/des.c +++ b/cipher/des.c @@ -723,16 +723,13 @@ is_weak_key ( const byte *key ) /* binary search in the weak key table */ left = 0; right = 63; - while(1) + while(left <= right) { middle = (left + right) / 2; if ( !(cmp_result=memcmp(work, weak_keys[middle], 8)) ) return -1; - if ( left == right ) - break; - if ( cmp_result > 0 ) left = middle + 1; else diff --git a/cipher/rndunix.c b/cipher/rndunix.c index a44d0950b..c005afba4 100644 --- a/cipher/rndunix.c +++ b/cipher/rndunix.c @@ -627,7 +627,7 @@ start_gatherer( int pipefd ) while( write( pipefd, &msg, sizeof(msg) ) != sizeof(msg) ) { if( errno == EINTR ) continue; - if( errno = EAGAIN ) { + if( errno == EAGAIN ) { struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 50000; |