mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-03-04 23:30:56 +00:00
make the fread() success-check code in Sys_RandomBytes() more secure
This commit is contained in:
parent
f0b43aba35
commit
a8ce30163e
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ qboolean Sys_RandomBytes( byte *string, int len )
|
||||||
if( !fp )
|
if( !fp )
|
||||||
return qfalse;
|
return qfalse;
|
||||||
|
|
||||||
if( !fread( string, sizeof( byte ), len, fp ) )
|
if( fread( string, sizeof( byte ), len, fp ) != len )
|
||||||
{
|
{
|
||||||
fclose( fp );
|
fclose( fp );
|
||||||
return qfalse;
|
return qfalse;
|
||||||
|
|
Loading…
Reference in a new issue