mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-03 15:55:43 +00:00
Fix unchecked error code on Windows
This commit is contained in:
parent
afe8f53ead
commit
acdb9b9525
|
@ -47,6 +47,8 @@ Bugfix
|
||||||
* Fix potential undefined behaviour in Camellia.
|
* Fix potential undefined behaviour in Camellia.
|
||||||
* Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a
|
* Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a
|
||||||
multiple of 8 (found by Gergely Budai).
|
multiple of 8 (found by Gergely Budai).
|
||||||
|
* Fix unchecked return code in x509_crt_parse_path() on Windows (found by
|
||||||
|
Peter Vaskovic).
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* Use deterministic nonces for AEAD ciphers in TLS by default (possible to
|
* Use deterministic nonces for AEAD ciphers in TLS by default (possible to
|
||||||
|
|
|
@ -990,6 +990,8 @@ int x509_crt_parse_path( x509_crt *chain, const char *path )
|
||||||
|
|
||||||
w_ret = MultiByteToWideChar( CP_ACP, 0, filename, len, szDir,
|
w_ret = MultiByteToWideChar( CP_ACP, 0, filename, len, szDir,
|
||||||
MAX_PATH - 3 );
|
MAX_PATH - 3 );
|
||||||
|
if( w_ret == 0 )
|
||||||
|
return( POLARSSL_ERR_X509_BAD_INPUT_DATA );
|
||||||
|
|
||||||
hFind = FindFirstFileW( szDir, &file_data );
|
hFind = FindFirstFileW( szDir, &file_data );
|
||||||
if( hFind == INVALID_HANDLE_VALUE )
|
if( hFind == INVALID_HANDLE_VALUE )
|
||||||
|
@ -1007,6 +1009,8 @@ int x509_crt_parse_path( x509_crt *chain, const char *path )
|
||||||
lstrlenW( file_data.cFileName ),
|
lstrlenW( file_data.cFileName ),
|
||||||
p, len - 1,
|
p, len - 1,
|
||||||
NULL, NULL );
|
NULL, NULL );
|
||||||
|
if( w_ret == 0 )
|
||||||
|
return( POLARSSL_ERR_X509_FILE_IO_ERROR );
|
||||||
|
|
||||||
w_ret = x509_crt_parse_file( chain, filename );
|
w_ret = x509_crt_parse_file( chain, filename );
|
||||||
if( w_ret < 0 )
|
if( w_ret < 0 )
|
||||||
|
|
Loading…
Reference in a new issue