mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-31 09:01:54 +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…
Add table
Add a link
Reference in a new issue