mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-04-20 11:01:48 +00:00
Fix unchecked error on windows
This commit is contained in:
parent
e12abf90ce
commit
2dc15c8e7d
|
@ -20,9 +20,10 @@ Bugfix
|
|||
* Fix memory leaks in PKCS#5 and PKCS#12.
|
||||
* Stack buffer overflow if ctr_drbg_update() is called with too large
|
||||
add_len (found by Jean-Philippe Aumasson) (not triggerable remotely).
|
||||
* Fix bug in MPI/bugnum on s390/s390x (reported by Dan Horák) (introduced
|
||||
* Fix bug in MPI/bignum on s390/s390x (reported by Dan Horák) (introduced
|
||||
in 1.2.12).
|
||||
|
||||
* Fix unchecked return code in x509_crt_parse_path() on Windows (found by
|
||||
Peter Vaskovic).
|
||||
|
||||
Changes
|
||||
* Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined.
|
||||
|
|
|
@ -1949,6 +1949,8 @@ int x509parse_crtpath( x509_cert *chain, const char *path )
|
|||
filename[len++] = '*';
|
||||
|
||||
w_ret = MultiByteToWideChar( CP_ACP, 0, filename, len, szDir, MAX_PATH - 3 );
|
||||
if( w_ret == 0 )
|
||||
return( POLARSSL_ERR_X509_INVALID_INPUT );
|
||||
|
||||
hFind = FindFirstFileW( szDir, &file_data );
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
|
@ -1966,6 +1968,8 @@ int x509parse_crtpath( x509_cert *chain, const char *path )
|
|||
lstrlenW(file_data.cFileName),
|
||||
p, len - 1,
|
||||
NULL, NULL );
|
||||
if( w_ret == 0 )
|
||||
return( POLARSSL_ERR_X509_FILE_IO_ERROR );
|
||||
|
||||
w_ret = x509parse_crtfile( chain, filename );
|
||||
if( w_ret < 0 )
|
||||
|
|
Loading…
Reference in a new issue