diff options
author | Richard Levitte <levitte@openssl.org> | 2017-07-15 11:21:11 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-07-15 18:53:07 +0200 |
commit | 1145995323a2a6b6e31602dbf2c546943a7db06f (patch) | |
tree | f558ccaf6a123105cc30e718cab8093ed0967ec8 /crypto/store | |
parent | OSSL_STORE "file" scheme loader: check for absolute path in URI later (diff) | |
download | openssl-1145995323a2a6b6e31602dbf2c546943a7db06f.tar.xz openssl-1145995323a2a6b6e31602dbf2c546943a7db06f.zip |
OSSL_STORE "file" scheme loader: check that a DOS device is correctly named
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3907)
Diffstat (limited to 'crypto/store')
-rw-r--r-- | crypto/store/loader_file.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c index 31ca2c6315..7cb145753e 100644 --- a/crypto/store/loader_file.c +++ b/crypto/store/loader_file.c @@ -783,9 +783,13 @@ static OSSL_STORE_LOADER_CTX *file_open(const OSSL_STORE_LOADER *loader, #ifdef _WIN32 /* Windows file: URIs with a drive letter start with a / */ if (p[0] == '/' && p[2] == ':' && p[3] == '/') { - p++; - /* We know it's absolute, so no need to check */ - path_data[path_data_n].check_absolute = 0; + char c = tolower(p[1]); + + if (c >= 'a' && c <= 'z') { + p++; + /* We know it's absolute, so no need to check */ + path_data[path_data_n].check_absolute = 0; + } } #endif path_data[path_data_n++].path = p; |