make the fread() success-check code in Sys_RandomBytes() more secure

This commit is contained in:
/dev/humancontroller 2013-04-14 18:33:25 +02:00 committed by Zack Middleton
parent f0b43aba35
commit a8ce30163e
1 changed files with 1 additions and 1 deletions

View File

@ -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;