mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-26 07:43:06 +00:00
Check additional return values in some test cases
This commit is contained in:
@@ -146,7 +146,12 @@ int main( int argc, char *argv[] )
|
||||
printf( " failed\n ! fopen returned NULL\n" );
|
||||
goto exit;
|
||||
}
|
||||
fgets( buf, sizeof(buf), f );
|
||||
if( fgets( buf, sizeof(buf), f ) == NULL )
|
||||
{
|
||||
fclose( f );
|
||||
printf( "Error: fgets() failed to retrieve password\n" );
|
||||
goto exit;
|
||||
}
|
||||
fclose( f );
|
||||
|
||||
i = (int) strlen( buf );
|
||||
|
||||
Reference in New Issue
Block a user