-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: urcd
action: commit
revision:
path_from:
revision_from: e9514a633997ae6eaad2f5a4f634b83578d42adf:
path_to:
revision_to:

git.thebackupbox.net

urcd

git://git.thebackupbox.net/urcd

commit e9514a633997ae6eaad2f5a4f634b83578d42adf
Author: root <root@localhost.(none)>
Date:   Fri Mar 13 07:52:53 2015 +0000

    [liburc] (security) taia96n: stronger time masking

diff --git a/src/liburc.h b/src/liburc.h

index 8b326cafa7e3891d25dc236234f1c94b04d35307..

index ..75ee6ea3e0a50d7cf7cd186cd02583b1c11976c1 100644

--- a/src/liburc.h
+++ b/src/liburc.h
@@ -71,12 +71,13 @@ int setlen(unsigned char *b, int blen) {
 }

 void taia96n(unsigned char *ts) {
+ unsigned char b[1];
  struct timeval now;
  tai_now(ts);
  tai_pack(ts,ts);
- gettimeofday(&now,'\x00');
- srand((unsigned) now.tv_usec);
- ts[7] &= (240 + (rand() & 15));
+ randombytes(b,1);
+ ts[7] &= 240;
+ ts[7] |= (b[0] & 15);
  randombytes(ts+8,4);
 }

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 18:02:41 2024