* (bug 3019) use the operating system's random number generator if possible
when generating the qkey file
This commit is contained in:
parent
8801b06a1e
commit
c6249fcc25
7 changed files with 65 additions and 9 deletions
|
@ -263,7 +263,7 @@ char *Com_MD5File( const char *fn, int length, const char *prefix, int prefix_le
|
|||
unsigned char digest[16] = {""};
|
||||
fileHandle_t f;
|
||||
MD5_CTX md5;
|
||||
char buffer[2048];
|
||||
byte buffer[2048];
|
||||
int i;
|
||||
int filelen = 0;
|
||||
int r = 0;
|
||||
|
@ -296,7 +296,7 @@ char *Com_MD5File( const char *fn, int length, const char *prefix, int prefix_le
|
|||
if(r + total > length)
|
||||
r = length - total;
|
||||
total += r;
|
||||
MD5Update(&md5 , (unsigned char *)buffer, r);
|
||||
MD5Update(&md5 , buffer, r);
|
||||
if(r < sizeof(buffer) || total >= length)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue