mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-07-04 14:28:27 +00:00
pk_sign: fix overriding and ignoring return values
This commit is contained in:
parent
69d1b293fc
commit
d959492797
|
@ -5,6 +5,8 @@ mbed TLS ChangeLog (Sorted per branch, date)
|
||||||
Bugfix
|
Bugfix
|
||||||
* Fix spurious uninitialized variable warning in cmac.c. Fix independently
|
* Fix spurious uninitialized variable warning in cmac.c. Fix independently
|
||||||
contributed by Brian J Murray and David Brown.
|
contributed by Brian J Murray and David Brown.
|
||||||
|
* Fix overriding and ignoring return values when parsing and writing to
|
||||||
|
a file in pk_sign program. Found by kevlut in #1142.
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* Support cmake build where Mbed TLS is a subproject. Fix
|
* Support cmake build where Mbed TLS is a subproject. Fix
|
||||||
|
|
|
@ -100,8 +100,7 @@ int main( int argc, char *argv[] )
|
||||||
|
|
||||||
if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 )
|
if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 )
|
||||||
{
|
{
|
||||||
ret = 1;
|
mbedtls_printf( " failed\n ! Could not parse '%s'\n", argv[1] );
|
||||||
mbedtls_printf( " failed\n ! Could not open '%s'\n", argv[1] );
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,6 +140,7 @@ int main( int argc, char *argv[] )
|
||||||
|
|
||||||
if( fwrite( buf, 1, olen, f ) != olen )
|
if( fwrite( buf, 1, olen, f ) != olen )
|
||||||
{
|
{
|
||||||
|
ret = 1;
|
||||||
mbedtls_printf( "failed\n ! fwrite failed\n\n" );
|
mbedtls_printf( "failed\n ! fwrite failed\n\n" );
|
||||||
fclose( f );
|
fclose( f );
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
Loading…
Reference in a new issue