mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +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 )
|
||||
return qfalse;
|
||||
|
||||
if( !fread( string, sizeof( byte ), len, fp ) )
|
||||
if( fread( string, sizeof( byte ), len, fp ) != len )
|
||||
{
|
||||
fclose( fp );
|
||||
return qfalse;
|
||||
|
|
Loading…
Reference in a new issue